diff --git a/rules/S6822/common/fix.adoc b/rules/S6822/common/fix.adoc new file mode 100644 index 0000000000..f2c19c5ea8 --- /dev/null +++ b/rules/S6822/common/fix.adoc @@ -0,0 +1,6 @@ +Remove ARIA role attributes when they are redundant. + +[source,html,diff-id=1,diff-type=compliant] +---- + +---- \ No newline at end of file diff --git a/rules/S6822/common/indtroduction.adoc b/rules/S6822/common/introduction.adoc similarity index 82% rename from rules/S6822/common/indtroduction.adoc rename to rules/S6822/common/introduction.adoc index 59ad724088..0d6899d6d2 100644 --- a/rules/S6822/common/indtroduction.adoc +++ b/rules/S6822/common/introduction.adoc @@ -4,4 +4,9 @@ include::../../../shared_content/jsts/aria-intro-1.adoc[] In HTML, certain elements have default roles. Default roles, also known as implicit roles, are roles that are inherently associated with certain HTML elements. These roles provide information about what an element does or the type of content it contains, which is especially useful for assistive technologies like screen readers. -For example, a ` +---- \ No newline at end of file diff --git a/rules/S6822/common/resources.adoc b/rules/S6822/common/resources.adoc index e69de29bb2..27f7be7df2 100644 --- a/rules/S6822/common/resources.adoc +++ b/rules/S6822/common/resources.adoc @@ -0,0 +1,9 @@ +== 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] \ No newline at end of file diff --git a/rules/S6822/html/rule.adoc b/rules/S6822/html/rule.adoc index f621fa335d..86fdd4b107 100644 --- a/rules/S6822/html/rule.adoc +++ b/rules/S6822/html/rule.adoc @@ -1,23 +1,5 @@ -include::../common/indtroduction.adoc[] +include::../common/introduction.adoc[] -== How to fix it in JSX - -Remove redundant ARIA role attribute. - -=== Code examples - -==== Noncompliant code example - -[source,html,diff-id=1,diff-type=noncompliant] ----- - ----- - -==== Compliant solution - -[source,html,diff-id=1,diff-type=compliant] ----- - ----- +include::../common/fix.adoc[] include::../common/resources.adoc[] \ No newline at end of file diff --git a/rules/S6822/javascript/rule.adoc b/rules/S6822/javascript/rule.adoc index 0ea8ef6b08..86fdd4b107 100644 --- a/rules/S6822/javascript/rule.adoc +++ b/rules/S6822/javascript/rule.adoc @@ -1,23 +1,5 @@ -include::../common/indtroduction.adoc[] +include::../common/introduction.adoc[] -== How to fix it in JSX - -Remove redundant ARIA role attribute. - -=== Code examples - -==== Noncompliant code example - -[source,javascript,diff-id=1,diff-type=noncompliant] ----- - ----- - -==== Compliant solution - -[source,javascript,diff-id=1,diff-type=compliant] ----- - ----- +include::../common/fix.adoc[] include::../common/resources.adoc[] \ No newline at end of file