Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

mdc-tab loses keyboard accessibility when deactivated #4429

@dfabulich

Description

@dfabulich

What MDC Web Version are you using?

0.44.0

What browser(s) is this bug affecting?

All browsers.

But, if you insist.

Chrome 72/Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36

Chrome 72/Mac
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36

Firefox 65/Windows
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:65.0) Gecko/20100101 Firefox/65.0

Firefox 65/Mac
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0

Safari 12.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15

What OS are you using?

macOS Mojave 10.14.3 and Windows 10.

What are the steps to reproduce the bug?

In this codepen: https://codepen.io/dfabulich/pen/XOOzjz

It's a basic tab bar with three tabs. Click in the white space under the tab bar and press the Tab key to focus tab One. Press Tab again and you'll focus tab Two. Press Tab again and you'll focus tab Three. Shift-Tab to focus on the second tab and press Enter to activate it, then Shift-Tab to focus tab One.

What is the actual behavior?

The tab One is no longer keyboard accessible; Shift-Tab leaves the document. Each time a tab is deactivated, its tabindex attribute is set to -1; the tab is no longer keyboard accessible.

What is the expected behavior?

The tabindex attribute should not change when activating or deactivating tabs; each tab should remain keyboard accessible as other tabs are selected and deselected.

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