diff --git a/rules/S1090/javascript/metadata.json b/rules/S1090/javascript/metadata.json new file mode 100644 index 0000000000..18e967a10a --- /dev/null +++ b/rules/S1090/javascript/metadata.json @@ -0,0 +1,25 @@ +{ + "title": "iFrames must have a title", + "type": "CODE_SMELL", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, + "tags": [ + "accessibility", + "react" + ], + "defaultSeverity": "Minor", + "ruleSpecification": "RSPEC-1090", + "sqKey": "S1090", + "scope": "All", + "defaultQualityProfiles": ["Sonar way"], + "quickfix": "infeasible", + "code": { + "impacts": { + "RELIABILITY": "LOW" + }, + "attribute": "CONVENTIONAL" + } +} diff --git a/rules/S1090/javascript/rule.adoc b/rules/S1090/javascript/rule.adoc new file mode 100644 index 0000000000..9de2043c38 --- /dev/null +++ b/rules/S1090/javascript/rule.adoc @@ -0,0 +1,42 @@ +== Why is this an issue? + +An iframe, or inline frame, is an HTML document embedded inside another HTML document on a website. The iframe HTML element is often used to insert content from another source, such as an advertisement, into a web page. + +In the context of web accessibility, ``++ // Noncompliant + ); +} +---- + +==== Compliant solution + +[source,javascript,diff-id=1,diff-type=compliant] +---- +function iframe() { + return ( + + ); +} +---- + +== Resources +=== Documentation + +* MDN web docs - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe[iframe element] +* WCAG - https://www.w3.org/WAI/WCAG21/Understanding/bypass-blocks[Bypass Blocks] +* WCAG - https://www.w3.org/WAI/WCAG21/Understanding/name-role-value[Name, Role, Value] diff --git a/rules/S6854/javascript/metadata.json b/rules/S6854/javascript/metadata.json index 6410ad51a7..42f4524aa8 100644 --- a/rules/S6854/javascript/metadata.json +++ b/rules/S6854/javascript/metadata.json @@ -1,7 +1,7 @@ { "title": "iFrames must have a title", "type": "CODE_SMELL", - "status": "ready", + "status": "deprecated", "remediation": { "func": "Constant\/Issue", "constantCost": "5min" @@ -10,11 +10,19 @@ "accessibility", "react" ], + "extra": { + "replacementRules": [ + "RSPEC-1090" + ], + "legacyKeys": [ + + ] + }, "defaultSeverity": "Minor", "ruleSpecification": "RSPEC-6854", "sqKey": "S6854", "scope": "All", - "defaultQualityProfiles": ["Sonar way"], + "defaultQualityProfiles": [], "quickfix": "infeasible", "code": { "impacts": {