[A11Y] Missing accessible label and landmark role on search input #2667
Labels
type/accessibility
Issues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.)
Milestone
Bug Report
Current Behavior
There is no accessible label on the Search input, and the landmark
search
role is missing.Placeholders should never be used in place of real landmarked elements, such as a
<label>
. This is because they prevent users with assistive technologies from selecting the input by voice control.Possible Solution
The W3 consortium recommend using hidden
<label>
s for inputs where we don't want to visibly display the label to the user, as these allow assistive tech to still use them.However, in this scenario, using
aria-label
on the<input>
is far easier, and also suggested as a possible approach for hiding label textSource: https://www.w3.org/WAI/tutorials/forms/labels/#hidden
The text was updated successfully, but these errors were encountered: