Skip to content

Why does the guidance state that an unlabelled tablist needs an aria label? #3211

@mbgower

Description

@mbgower

On https://www.w3.org/WAI/ARIA/apg/patterns/tabs/ it states:

If the tab list has a visible label, the element with role tablist has aria-labelledby set to a value that refers to the labelling element. Otherwise, the tablist element has a label provided by aria-label.

Teams are interpreting the second sentence to mean every tablist must be named. What is the rationale?

Most tablists are not visually labelled, and they should not need to be programmatically named either. A tab/tablist is a composite element, made up of a tablist, set of tabs, and associated tabpanels. The tablist role provides the context for the interaction, and the active tab element provides a name (and context) for the composite component.

The above quote seems overly prescriptive, and is leading to teams making up arbitrary names for unlabelled tabs, which go undetected during testing and can add as much confusion as benefit.

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