32 lines
929 B
Plaintext
32 lines
929 B
Plaintext
![]() |
== Why is this an issue?
|
||
|
|
||
|
include::../../../shared_content/jsts/aria-intro-1.adoc[]
|
||
|
|
||
|
This rule checks that the values of ARIA attributes "aria-*" in DOM elements are valid.
|
||
|
|
||
|
== How to fix it in JSX
|
||
|
|
||
|
Check that each element with a defined ARIA attribute has a valid value.
|
||
|
|
||
|
[source,javascript,diff-id=1,diff-type=noncompliant]
|
||
|
----
|
||
|
<span aria-hidden="ok">foo</span>
|
||
|
----
|
||
|
|
||
|
To fix the code use a valid value for the aria-* attribute.
|
||
|
|
||
|
[source,javascript,diff-id=1,diff-type=compliant]
|
||
|
----
|
||
|
<span aria-hidden="true">foo</span>
|
||
|
----
|
||
|
|
||
|
== Resources
|
||
|
=== Documentation
|
||
|
|
||
|
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques[MDN - Using ARIA: Roles, states, and properties]
|
||
|
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes[MDN - ARIA states and properties (Reference)]
|
||
|
|
||
|
=== Standards
|
||
|
|
||
|
* https://www.w3.org/TR/wai-aria-1.2/[W3C - Accessible Rich Internet Applications (WAI-ARIA) 1.2]
|