diff --git a/rules/S6854/javascript/metadata.json b/rules/S6854/javascript/metadata.json new file mode 100644 index 00000000000..6410ad51a7b --- /dev/null +++ b/rules/S6854/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-6854", + "sqKey": "S6854", + "scope": "All", + "defaultQualityProfiles": ["Sonar way"], + "quickfix": "infeasible", + "code": { + "impacts": { + "RELIABILITY": "LOW" + }, + "attribute": "CONVENTIONAL" + } +} diff --git a/rules/S6854/javascript/rule.adoc b/rules/S6854/javascript/rule.adoc new file mode 100644 index 00000000000..9de2043c38d --- /dev/null +++ b/rules/S6854/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/metadata.json b/rules/S6854/metadata.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/rules/S6854/metadata.json @@ -0,0 +1,2 @@ +{ +}