5.5.1 fieldset Element Accessible Name Computation
If the fieldset element has an aria-label or an aria-labelledby attribute the accessible name is to be calculated using the algorithm defined in Accessible Name and Description: Computation and API Mappings 1.1.
Otherwise use legend subtree
Otherwise use title attribute
If none of the above yield a usable text string there is no accessible name
What is the legend subtree?
Similarly for figure/figcaption, table/caption.
Cases to consider:
- there might be no such child element
- there might be more than one such child element
- the flat tree might differ from the DOM tree (e.g. if there's a
display: contents element in between, or if it crosses a shadow DOM boundary).
- the element might exist in the DOM but not in the flat tree (e.g.
display: none).
What is the legend subtree?
Similarly for figure/figcaption, table/caption.
Cases to consider:
display: contentselement in between, or if it crosses a shadow DOM boundary).display: none).