27 lines
584 B
Plaintext
Raw Normal View History

include::../common/rule.adoc[tag=header]
== How to fix it in JSX
Make sure that DOM elements with the `aria-activedescendant` property have a `tabIndex` property, or use an element with an inherent one.
=== Code examples
==== Noncompliant code example
[source,javascript,diff-id=1,diff-type=noncompliant]
----
<div aria-activedescendant={descendantId}>
{content}
</div>
----
==== Compliant solution
[source,javascript,diff-id=1,diff-type=compliant]
----
<div aria-activedescendant={descendantId} tabIndex={0}>
{content}
</div>
----
include::../common/rule.adoc[tag=footer]