Update with html rspec

This commit is contained in:
Michal Zgliczynski 2024-04-09 11:45:05 +02:00
parent e70b576140
commit 2f7006c9ac
2 changed files with 14 additions and 39 deletions

View File

@ -1,44 +1,27 @@
FIXME: add a description
// If you want to factorize the description uncomment the following line and create the file.
//include::../description.adoc[]
== Why is this an issue?
FIXME: remove the unused optional headers (that are commented out)
include::../../../shared_content/jsts/aria-intro-1.adoc[]
//=== What is the potential impact?
This rule checks that when using the `role` property in DOM elements, its value is a valid non-abstract ARIA role.
== How to fix it
//== How to fix it in FRAMEWORK NAME
=== Code examples
Check that each element with a defined ARIA role has a valid non-abstract value.
==== Noncompliant code example
[source,text,diff-id=1,diff-type=noncompliant]
[source,javascript,diff-id=1,diff-type=noncompliant]
----
FIXME
<div role="meth" aria-label="a^{2} + b^{2} = c^{2}">
a<sup>2</sup> + b<sup>2</sup> = c<sup>2</sup>
</div>
----
==== Compliant solution
To fix the code use a valid value for the ARIA role attribute.
[source,text,diff-id=1,diff-type=compliant]
[source,javascript,diff-id=1,diff-type=compliant]
----
FIXME
<div role="math" aria-label="a^{2} + b^{2} = c^{2}">
a<sup>2</sup> + b<sup>2</sup> = c<sup>2</sup>
</div>
----
//=== How does this work?
//=== Pitfalls
//=== Going the extra mile
//== Resources
//=== Documentation
//=== Articles & blog posts
//=== Conference presentations
//=== Standards
//=== External coding guidelines
//=== Benchmarks
include::../common/resources/resources.adoc[]

View File

@ -26,12 +26,4 @@ To fix the code use a valid value for the ARIA role attribute.
</div>
----
== Resources
=== Documentation
* MDN web docs - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques[Using ARIA: Roles, states, and properties]
* MDN web docs - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles[ARIA roles (Reference)]
=== Standards
* W3C - https://www.w3.org/TR/wai-aria-1.2/[Accessible Rich Internet Applications (WAI-ARIA) 1.2]
include::../common/resources/resources.adoc[]