Skip to content

isFocusable is too strict on tabindex #4632

@WilcoFiers

Description

@WilcoFiers

The way axe-core checks whether tabindex is valid is by calling parseInt(). That's different from how HTMLhttps://html.spec.whatwg.org/#rules-for-parsing-integers says to do it. Basically, axe should use this to match, and then parseInt the captured group: /^\s*([-+]?\d+)/

The issue is here: lib/commons/dom/is-focusable.js
The tests for it need to be here: test/commons/dom/is-focusable.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreIssues in the core code (lib/core)fixBug fixesgood first issueFor first-time contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions