From 2f7006c9ac72103679d60dbe02830f38ae3abeae Mon Sep 17 00:00:00 2001 From: Michal Zgliczynski Date: Tue, 9 Apr 2024 11:45:05 +0200 Subject: [PATCH] Update with html rspec --- rules/S6821/html/rule.adoc | 43 ++++++++++---------------------- rules/S6821/javascript/rule.adoc | 10 +------- 2 files changed, 14 insertions(+), 39 deletions(-) diff --git a/rules/S6821/html/rule.adoc b/rules/S6821/html/rule.adoc index 4bd440f87a..c2365c8f61 100644 --- a/rules/S6821/html/rule.adoc +++ b/rules/S6821/html/rule.adoc @@ -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 +
+ a2 + b2 = c2 +
---- -==== 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 +
+ a2 + b2 = c2 +
---- -//=== 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[] \ No newline at end of file diff --git a/rules/S6821/javascript/rule.adoc b/rules/S6821/javascript/rule.adoc index 71f6c09ebf..8da1566cad 100644 --- a/rules/S6821/javascript/rule.adoc +++ b/rules/S6821/javascript/rule.adoc @@ -26,12 +26,4 @@ To fix the code use a valid value for the ARIA role attribute. ---- -== 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[]