Skip to content

feat(aria/tabs): Support activation on click instead of only on pointerdown #32971

@makmn1

Description

@makmn1

Feature Description

Support an input on whether activation is triggered on pointerdown or on click. Optionally, add support for a callback for developers to decide if a tab should be activated.

Use Case

Currently, it's impossible for developers to decide if a tab should be activated after a click event since tab activation always happens on pointerdown. One use case for this is for scrollable tabs. If the tab list is scrollable, attempting to scroll it will automatically activate the tab a user taps on.

With this feature, a developer could track if the tab list was scrolled since the last pointerdown event. If so, they can decide not to activate the tab on the click event. This type of interaction pattern is demonstrated by the accessibility guidelines for the Material Design Tabs component where tab activation doesn't occur when scrolling.

If adding something like a shouldActivate callback is too much, it's still valuable to support activation on click since that gives developers to option to prevent passing down the click event to the tab if they don't want it to be activated.

Similar to #32915

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: material/tabsfeatureLabel used to distinguish feature request from other issuesgemini-triagedLabel noting that an issue has been triaged by geminineeds triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions