Opened 4 years ago
Closed 4 years ago
#52414 closed defect (bug) (invalid)
Accessibility checker flags search form
Reported by: | TylerTork | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | |
Focuses: | accessibility | Cc: |
Description
Using "achecker.ca" to test accessibility of a WordPress site, I got the following warning regarding the core Search widget:
Check 57: input element, type of "text", missing an associated label.
Repair: Add a label element that surrounds the control's label. Set the for attribute on the label element to the same value as the id attribute of the control. And/or add a title attribute to the input element. And/or create a label element that contains the input element.
The HTML it flagged was:
<input type="text" name="s" class="form-control" placeholder="Search">
Could we please add a title attribute as suggested by the testing tool?
Change History (2)
Note: See
TracTickets for help on using
tickets.
@TylerTork Thanks for the report!
The accessibility checker indicates that there is no label for that search input. The standard core search widget markup does include a
label
tag with text in it.See general-template.php
Unfortunately, the Graphene theme overrides the standard form markup in its searchform.php template file and does not supply a label. The WAVE evaluation tool also flags missing button text for the submit button.
You could report these accessibility errors in the theme's support forum. Because this is not a core bug, I'll close the ticket here.