Adrian Roselli:
Too often folks will grab ARIA first to provide an accessible name for a thing. Or they may sprinkle hidden content around a form. In most cases the impact of those decisions is unknown. The assumption that they do the same thing, give the same output to all users, is wrong.
In short, here’s the priority he follows when assigning an accessible name to a control:
- Native HTML techniques,
aria-labelledby
pointing at existing visible text,- Visibly-hidden content that is still in the page,
aria-label
.
Good ole’ HTML first, the rule of least power in action 😉