Skip to content

a[href][disabled] is still a focusable element #3315

Closed
@WilcoFiers

Description

@WilcoFiers

Noticed this in reviewing #3165. In determining if an element is focused, axe-core looks at the disabled attribute. However it doesn't check if that attribute is allowed for the node. So the following link is incorrectly determined as not focusable:

<a href="foo.html" disabled>Hello</a>

This bug exists in lib/commons/dom/focus-disabled.js. The fix is to check vNode.props.nodeName before looking for the disabled attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    commonsIssues in the common code (lib/commons)fixBug fixesgood first issueFor first-time contributorsprA pr has been created for the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions