w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.14k stars 257 forks source link

SC 2.5.3 Label in name and abbreviated text in dropdown list #4023

Closed sarasuri closed 3 months ago

sarasuri commented 3 months ago

Hello,

In a dropdown list where the visible labels use two-letter abbreviations for provinces, the "aria-label" attribute on each

` Would this be considered as a failure for the SC 2.5.3? Any thoughts or feedback would be appreciated. Thank you
TestPartners commented 3 months ago

That would clearly be a non-conformance because the visible label does not match, and is not a substring of, the accessible name. In practical terms, voice recognition software may not respond to commands like "click B C". You could achieve conformance by making the aria-label attributes include the two-letter abbreviations, such as aria-label="British Columbia BC". However, I think it's poor usability, so I would not recommend it unless there is some genuine reason why you can't display the full province name.