Skip to content

<details> element is tabbable via keyboard but has a computed tabIndex of -1 #175

@giacomo-petri

Description

@giacomo-petri

The <details> element remains focusable and operable via keyboard even when no <summary> is nested. Given this behavior, I would expect its computed tabIndex value to be 0. However, none of the major browsers expose it as such (all return -1).

I understand that WPT currently focuses on testing accessible names and roles, but considering there is an existing folder in WPT called "focus", it might be reasonable and feasible to include this scenario as well.

I've added a file in wpt/focus, but feel free to remove, update, or modify it if it's misplaced or if the approach is incorrect.

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