Skip to content

empty-heading-matches should use getRole() to account for presentation conflict resolution #3482

@WilcoFiers

Description

@WilcoFiers

The following should fail the empty-heading rule, it is instead considered inapplicable because of role=none. However, role=none is in practice ignored because of the use of aria-label. As a global attribute, aria-label tells browsers to ignore role=none. This can be solved by updating the rules/heading-matches.js, replacing its custom role computation with the aria.getRole() commons method, which already account for presentational role conflict resolution.

<h1 aria-label="" role="none"></h1>

Metadata

Metadata

Assignees

Labels

ACT Rulesgood first issueFor first-time contributorsprA pr has been created for the issue

Type

No type
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