ESLint Plugin Prefer Implicit

Modern HTML already provides rich, implicit semantics. However, many codebases add redundant or even harmful ARIA attributes and roles. This ESLint plugin enforces a simple principle: If the browser already knows it, don't repeat it.

The plugin ships with six auto-fixable rules:

  • no-redundant-role — Disallow role attributes that match the element's implicit ARIA role
  • no-destructive-role — Disallow role attributes that remove native semantics of interactive or structural elements
  • no-conflicting-aria — Disallow aria-live values that conflict with the implicit live region behavior of a declared role
  • no-unsupported-aria — Disallow ARIA attributes not supported by the element's role
  • no-default-aria — Disallow ARIA attributes set to their default value or empty string
  • no-hidden-focusable — Disallow elements that are both focusable and aria-hidden="true"

All rules provide safe autofixes for static attribute values.