2026-10-27 21:06 UTC
Not all HTML elements need an accessible name. Headings, paragraphs, lists and so on are just text, which assistive tech already has access to. Elements that must have an accessible name include:
links
buttons
form inputs
images
This is not an exhaustive list. For example, a legend inside a fieldset will serve as the fieldset’s accessible name.
Replies (1)
-
@se_davidobrien@mastodon.scot 2026-10-27 21:07
Browsers determine the accessible name by checking for these things and, crucially, in this order: aria-labelledby aria-label Native HTML elements (such as a caption, label, or alt) The element’s text content title attribute Browsers look for each of these in turn. As soon as they find one, they stop.