Skip to content

selectTab() without changing focus? #117

Description

@medmunds

Thanks for this! A self-contained, unstyled component implementing the ARIA tab pattern is really useful. I don't know if you're accepting enhancement requests from outside, but if so…

Is there a way to programmatically change which tab is selected without moving the focus? I'm trying to sync the selected tab across several tab-container instances on a page. I found the (undocumented but exposed) selectTab(index) method. Unfortunately, it calls focus() on the tab button it's activating, so calling it to sync tabs makes the focus wander around the page.

Would you be open to a PR to support an option like selectTab(index, {focus: false})?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions