diff --git a/rules/S6822/common/indtroduction.adoc b/rules/S6822/common/indtroduction.adoc new file mode 100644 index 00000000000..59ad7240884 --- /dev/null +++ b/rules/S6822/common/indtroduction.adoc @@ -0,0 +1,7 @@ +== Why is this an issue? + +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 ` +---- + +==== Compliant solution + +[source,html,diff-id=1,diff-type=compliant] +---- + +---- + +include::../common/resources.adoc[] \ No newline at end of file diff --git a/rules/S6822/javascript/metadata.json b/rules/S6822/javascript/metadata.json index c08bfe34647..2c63c085104 100644 --- a/rules/S6822/javascript/metadata.json +++ b/rules/S6822/javascript/metadata.json @@ -1,26 +1,2 @@ { - "title": "No redundant ARIA role", - "type": "CODE_SMELL", - "status": "ready", - "remediation": { - "func": "Constant\/Issue", - "constantCost": "5min" - }, - "tags": [ - "accessibility", - "react" - ], - "defaultSeverity": "Major", - "ruleSpecification": "RSPEC-6822", - "sqKey": "S6822", - "scope": "All", - "defaultQualityProfiles": ["Sonar way"], - "quickfix": "targeted", - "code": { - "impacts": { - "MAINTAINABILITY": "LOW", - "RELIABILITY": "LOW" - }, - "attribute": "CONVENTIONAL" - } } diff --git a/rules/S6822/javascript/rule.adoc b/rules/S6822/javascript/rule.adoc index 0b926198299..0ea8ef6b08a 100644 --- a/rules/S6822/javascript/rule.adoc +++ b/rules/S6822/javascript/rule.adoc @@ -1,10 +1,4 @@ -== Why is this an issue? - -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 ` ---- -== 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.adoc[] \ No newline at end of file diff --git a/rules/S6822/metadata.json b/rules/S6822/metadata.json index 2c63c085104..c08bfe34647 100644 --- a/rules/S6822/metadata.json +++ b/rules/S6822/metadata.json @@ -1,2 +1,26 @@ { + "title": "No redundant ARIA role", + "type": "CODE_SMELL", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, + "tags": [ + "accessibility", + "react" + ], + "defaultSeverity": "Major", + "ruleSpecification": "RSPEC-6822", + "sqKey": "S6822", + "scope": "All", + "defaultQualityProfiles": ["Sonar way"], + "quickfix": "targeted", + "code": { + "impacts": { + "MAINTAINABILITY": "LOW", + "RELIABILITY": "LOW" + }, + "attribute": "CONVENTIONAL" + } }