rspec/rules/S6850/html/rule.adoc

46 lines
1.2 KiB
Plaintext

include::../common/rule.adoc[tag=header]
=== Code examples
==== Noncompliant code example
[source,html,diff-id=1,diff-type=noncompliant]
----
<h1>JavaScript Programming Guide</h1>
<p>An introduction to JavaScript programming and its applications.</p>
<h2>JavaScript Basics</h2>
<p>Understanding the basic concepts in JavaScript programming.</p>
<h3>Variables</h3>
<p>Explanation of what variables are and how to declare them in JavaScript.</p>
<h3 aria-hidden>Data Types</h3> <!-- Noncompliant -->
<p>Overview of the different data types in JavaScript.</p>
<h3 /> <!-- Noncompliant -->
<p>Understanding how to declare and use functions in JavaScript.</p>
----
==== Compliant solution
[source,html,diff-id=1,diff-type=compliant]
----
<h1>JavaScript Programming Guide</h1>
<p>An introduction to JavaScript programming and its applications.</p>
<h2>JavaScript Basics</h2>
<p>Understanding the basic concepts in JavaScript programming.</p>
<h3>Variables</h3>
<p>Explanation of what variables are and how to declare them in JavaScript.</p>
<h3>Data Types</h3>
<p>Overview of the different data types in JavaScript.</p>
<h3>Functions</h3>
<p>Understanding how to declare and use functions in JavaScript.</p>
----
include::../common/rule.adoc[tag=footer]