Skip to content

Consider allowing header[role=banner] #3108

@WilcoFiers

Description

@WilcoFiers
  <main>
    <header role="banner">
      Hello world
    </header>
  </main>

This fails aria-allowed-role, in addition to failing landmark-banner-is-top-level. It's probably better for axe-core to only fail it under the top-level rule. It's a little odd to allow role=banner on a header if it's at the top, but to fail it if it's inside another landmark.

The same problem exists for other landmarks. I think the fix is to add banner to the header element in standards/html-elms.js.

Metadata

Metadata

Assignees

Labels

best practicegood first issueFor first-time contributorsprA pr has been created for the issuerulesIssue or false result from an axe-core rule

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