How to fix: button name differs from its visible text
WCAG 2.2 success criterion 2.5.3 (level A)
Why it matters
Voice control users say what they see ("Click Buy") and nothing happens.
How to fix
Make aria-label start with the visible text.
<button aria-label="Buy now, red shoe">Buy now</button>
Test it yourself
- For each button and link with an aria-label, check that the label starts with the visible text. Voice control users say what they see.
Common mistakes
- A "Buy" button with aria-label="Add product to basket".
- Adding the product name to aria-label but dropping the visible word, such as "Read more" becoming "Article about shipping".
Check your own site
Find this and other problems on your website in 30 seconds, free.