Affects Version/s: 3.0.6
Sprint:UI - 2023-2
Related to WCAG 2.1 level AA criteria 2.4.6
Buttons to launch a search all have the same label, e.g. between the quick search and the search button in the default assets search.
Expected: each button should have a differentiated label.
Recommendation to fix
Labels MUST be meaningful.
HOW TO FIX:
Fix this issue by using ONE of the following techniques:
1. Use an aria-label attribute to provide a complete programmatic label for the button.
<button aria-label="Register for Class A: House training your puppy">Register</button>
2. Use an aria-describedby attribute to associate visible text with the button to provide a complete description of the button purpose.
<h3 id="class-a">Class A: House training your puppy</h3>
3. Change the button label (both visible and programmatic) to provide a complete description of the button purpose.
Deque University: https://dequeuniversity.com/class/forms2/labels/meaningful
When multiple buttons on a page have the same name but a different action, visual users may be able to tell the purpose of each button by its location on the screen or the content near it, but screen reader users may not be able to figure that out so easily. (For example, when there are multiple "Buy Me" buttons on the screen, which product will a particular button buy?) Buttons with the same name but different action can be differentiated programmatically without changing the visual appearance of the content. This will allow a screen reader user to understand what each button will do and avoid making mistakes.
- is cloned by
ELEMENTS-1427 Improve label for sort order button