github-actions[bot] c9cbcb2a0c
Add HTML to rule S6823 (#3673)
* Add html to rule S6823

* Remove HTML mention in "How to fix it"

---------

Co-authored-by: ericmorand-sonarsource <ericmorand-sonarsource@users.noreply.github.com>
Co-authored-by: Eric MORAND <eric.morand@sonarsource.com>
2024-02-23 09:56:47 +01:00

27 lines
584 B
Plaintext

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]