Would it be possible to add an @alt tag to the #edit-keywords field?

Right now, the markup fails
A. 508 Standards, Section 1194.22, (a)

Rule: 1.1.2 - All INPUT elements are required to contain the alt attribute or use a LABEL.

I propose adding the bold code below: (without linebreaks, of course:)

<form id="faceted-search-ui-form-1" method="post" accept-charset="UTF-8" action="/">
<div><div id="edit-keywords-wrapper" class="form-item">
 <input type="text" class="form-text" value="" size="20" id="edit-keywords" name="keywords" maxlength="255" 

alt="keywords"

>
</div>
<input type="hidden" value="results" id="edit-stage" name="stage">
<input type="hidden" value="" id="edit-facet-key" name="facet-key">
<input type="hidden" value="" id="edit-facet-id" name="facet-id">
<input type="hidden" value="" id="edit-facet-sort" name="facet-sort">
<input type="submit" class="form-submit" value="Search" id="edit-submit" name="op">
<a class="faceted-search-more" href="/find/">More options</a><input type="hidden" value="form-" id="form-" name="form_build_id">
<input type="hidden" value="" id="edit-faceted-search-ui-form-1-form-token" name="form_token">
<input type="hidden" value="faceted_search_ui_form_1" id="edit-faceted-search-ui-form-1" name="form_id">

</div></form>

Comments

Mac Clemmens’s picture

StatusFileSize
new544 bytes

Here's a patch:

Do not use the attached patch! Use the one on comment #3..

--- faceted_search_ui.module
+++ (current document)
@@ -746,6 +746,7 @@
'#default_value' => '',
'#size' => $current_stage == 'select' ? 35 : 20,
'#maxlength' => 255,
+ '#attributes' => array('alt' => 'keywords'),
);

// TODO: This ought to be cached and greatly simplified... {

Mac Clemmens’s picture

StatusFileSize
new303 bytes

Corrected patch attached.

EvanDonovan’s picture

Status: Active » Needs review

If there's a patch, should be "needs review".

Mac Clemmens’s picture

Status: Needs review » Patch (to be ported)

I think this is safe to port -- it's just adding an alt tag to the keywords box to ensure WCAG compliance.

EvanDonovan’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

"patch (to be ported)" is a status reserved for when the patch has been applied to a branch of the module and needs to be ported to an earlier branch.

Status should be "needs review" until someone else has tested the patch and marked it "reviewed & tested by the community".

The patch looks harmless enough, so I'll mark it that.

Mac Clemmens’s picture

Thanks, and I appreciate your helpful explanation of the statuses.

YK85’s picture

subscribing

david lesieur’s picture

Status: Reviewed & tested by the community » Fixed

Committed, with change for allowing translation of the alt attribute.

Status: Fixed » Closed (fixed)

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