Skip to content

Tabs: tabpanel should be labelled by the Picker button element when Tabs are collapsed #1271

@majornista

Description

@majornista

🐛 Bug Report

In collapsed mode, the TabList goes away and is replaced by a Picker. The aria-labelledby attribute then refers to an element that does not exist in the DOM.

🤔 Expected Behavior

The aria-labelledby attribute on the tabpanel should be updated to refer to the Picker rather than the current tab, which is no longer in the DOM.

😯 Current Behavior

The aria-labelledby attribute on the tabpanel always refers to a tab element that may no longer exist in the DOM.

💁 Possible Solution

Define an id for the CollapsibleTablistPicker element and use that reference for the aria-labelledby attribute on the tabpanel when the TabList is collapsed.

🔦 Context

Accessibility issue.

💻 Code Sample

🌍 Your Environment

Software Version(s)
react-spectrum React-Spectrum Tabs 3.0.0-alpha.2
Browser All
Operating System All

🧢 Your Company/Team

Adobe/Accessibility

🕷 Tracking Issue (optional)

Relates to #1145 and #1236

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