The text box in the cockpit lacks a label. This makes it harder to use for users using screen readers.

I used the toolbar at http://wave.webaim.org/toolbar to identify the problem.

See screnshot for an example of the tool in use and complaining about the form.

Search should probably be wrapped in a t().. Let me know if you want me to re-roll the patch.

Comments

dww’s picture

But the search button has a label. Do we need both? If there has to be a label on both the button and the text box for this to be accessible, I'd prefer the one on the text box to be hidden via CSS or something so that it's read but not shown, since it's just clutter for the visual UI.

Everett Zufelt’s picture

Yes, there does need to be an 'accessible name' on the search box. This can be accomplished with:

1. Visible label associated with the for attribute.
2. Invisible label using the for attribute, hidden with the D7 element-invisible class.
3. title attribute on the input element.

dww’s picture

d.o isn't running D7, so option #2 won't work directly. I guess we can replicate whatever element-invisible is doing in project_issue.css. Or, we'll have to see how to accomplish #3 without a visible label. Thanks for the input, Everett!

Cheers,
-Derek

Everett Zufelt’s picture

Yep, just copy from d7 modules/system/system.base.css : .element-invisible. Alternatively set the title attribute of the search input element to the desired text.

dww’s picture

Category: task » bug
Status: Active » Needs work

A patch was posted at #1088370-4: Search box in Issues for Drupal.org webmasters missing a label but it doesn't do the approach discussed here. I'm not fond of adding the duplicate label in the sighted case, so I'd prefer (if possible) to do what Everett and I worked out here...

Thanks everyone!
-Derek

mgifford’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes

This is still an issue after the d7 upgrade.

mgifford’s picture

Issue summary: View changes
Priority: Normal » Major
Status: Needs work » Needs review
StatusFileSize
new489 bytes

After the upgrade this is a bit easier to do.

I'm not sure it's exactly what @dww was looking for, but let's get this in there and then find ways to improve it as necessary.

This fixes the accessibility problem and has no changes to the UI.

drumm’s picture

Status: Needs review » Needs work

Looks good, except that '#title' => 'Search' is missing t().

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new493 bytes

Sorry Neil.. I should have just done that after I realized it. Here's a re-roll.

drumm’s picture

Status: Needs review » Fixed

Committed and deploying later today.

mgifford’s picture

Thanks Neil! That's great...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.