Skip to content

Unclear which legend element to be used as accessible name for fieldset #145

Description

@zcorpan

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions