Skip to content
SilktideHelp

Conflicting ARIA role

Silktide checks elements that declare an explicit role against the meaning they already have in HTML. It reports roles that are not allowed on that element, and roles that merely restate what the element already means.

<!-- Problem: a nav element cannot be a button -->
<nav role="button">…</nav>

<!-- Problem: redundant, nav already has this role -->
<nav role="navigation">…</nav>

<!-- Fix: let the element speak for itself -->
<nav>…</nav>

Why this matters

Every element carries built-in meaning that relies on. An role that conflicts with that meaning creates an element that looks like one thing and announces itself as another - a user might hear "button" on what is really the site's navigation, and lose the landmark they use to find their way around the page. Redundant roles are less harmful but add noise, invite future mistakes, and signal ARIA being used where none is needed.

How to fix it

  1. For a conflicting role, either remove the role or switch to an element that genuinely carries the meaning you want - if it should act as a button, use <button>.
  2. For a redundant role such as <nav role="navigation"> or <button role="button">, delete the role attribute. The element already exposes that role by itself.

How Silktide tests this

  1. Find every element on the page with a role attribute, skipping roles that are unknown or abstract (those are reported by Invalid ARIA role).
  2. Compare the role against the combinations the ARIA in HTML specification allows for that element, and report roles the element does not permit.
  3. Report roles that duplicate the element's own implicit role, except role="list" on <ul> and <ol> (see below).
  4. When a role attribute lists several roles, only the first recognized ARIA role is considered, the same one browsers use. Unknown words before it are skipped.

Findings distinguish the two cases, so you can prioritize conflicts over redundancy.

Troubleshooting

The redundant role is there for older browsers

Explicit landmark roles like role="navigation" were once recommended as a safety net for old assistive technology. Support for the native elements has been universal for years, and the duplicated role now costs more in maintenance than it returns. Remove it, or the finding if your support policy requires keeping it.

role="list" on a list is not reported

Safari with VoiceOver stops announcing a <ul> or <ol> as a list when its bullets are removed with list-style: none. Adding role="list" restores the list, so Silktide does not report it as redundant on those elements.

Learn more

Last updated

Was this page helpful?