Skip to content

noAriaUnsupportedElements (since v1.0.0)

Diagnostic Category: lint/a11y/noAriaUnsupportedElements

Sources:

Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.

<meta charset="UTF-8" role="meta" />
a11y/noAriaUnsupportedElements.js:1:1 lint/a11y/noAriaUnsupportedElements  FIXABLE  ━━━━━━━━━━━━━━━━

   Avoid the role attribute and aria-* attributes when using meta, html, script, and style elements.
  
  > 1 │ <meta charset="UTF-8" role="meta" />
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2 │ 
  
   Using role on elements that do not support them can cause issues with screen readers.
  
   Unsafe fix: Remove the role="meta"  attribute.
  
    1 │ <meta·charset="UTF-8"·role="meta"·/>
                        ------------  
<html aria-required="true" />
a11y/noAriaUnsupportedElements.js:1:1 lint/a11y/noAriaUnsupportedElements  FIXABLE  ━━━━━━━━━━━━━━━━

   Avoid the role attribute and aria-* attributes when using meta, html, script, and style elements.
  
  > 1 │ <html aria-required="true" />
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2 │ 
  
   Using aria-* on elements that do not support them can cause issues with screen readers.
  
   Unsafe fix: Remove the aria-required="true"  attribute.
  
    1 │ <html·aria-required="true"·/>
        ---------------------  
<meta charset="UTF-8" />
<html></html>