Skip to content

Commit ad4542f

Browse files
authored
Fix incorrect highlight.js overrides (#4624)
This fixes instances where we had specified the wrong `language-...` class in `<pre><code class="...">`, causing highlight.js to highlight code incorrectly. (Originally fixed/reported in #4611, which is being split up and closed)
1 parent bf126a3 commit ad4542f

File tree

13 files changed

+19
-19
lines changed

13 files changed

+19
-19
lines changed

techniques/aria/ARIA24.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h3>Basic principle of the technique</h3>
2828

2929
<h4>1. Author adds a font-face to the CSS</h4>
3030
<p>The first step is used for adding a font face with icons via the CSS file.</p>
31-
<pre xml:space="preserve"><code class="language-html">/* specify font-family name for icons */
31+
<pre xml:space="preserve"><code class="language-css">/* specify font-family name for icons */
3232
@font-face { font-family: 'IconFontRoleImg'; }
3333

3434
/* default class for fonts-face with icons */
@@ -48,7 +48,7 @@ <h4>2. Author adds the font classes to the HTML</h4>
4848

4949
<h4>3. User CSS file replaces the font-family except the icon file</h4>
5050
<p>The third step uses the ":not selector" in combination with the "[attribute] selector" to only replace font faces for regular text.</p>
51-
<pre xml:space="preserve"><code class="language-html">/* replaces font faces but excludes all elements with attribute role="img" */
51+
<pre xml:space="preserve"><code class="language-css">/* replaces font faces but excludes all elements with attribute role="img" */
5252
*:not([role="img"]) { font-family: Verdana, sans-serif !important; }</code></pre>
5353

5454
</section>

techniques/client-side-script/SCR14.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h3>Updating screen reader settings for stock price update alerts</h3>
2828
<section id="the-javascript">
2929
<h4>The JavaScript</h4>
3030

31-
<pre xml:space="preserve"><code class="language-javascript">&lt;script&gt;
31+
<pre xml:space="preserve"><code class="language-html">&lt;script&gt;
3232
document.addEventListener("DOMContentLoaded", function (e) {
3333
const stockBox = document.querySelector("#stock-box");
3434
const stockMovement = document.querySelector("#stock-movement");

techniques/css/C29.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ <h5>At the beginning of the PHP page</h5>
289289
<section id="head-section">
290290

291291
<h5>In the &lt;head&gt; section</h5>
292-
<pre xml:space="preserve"><code class="language-html">&lt;link rel="stylesheet" media="screen" href="&lt;?php echo($thestyle);?&gt;.css"&gt;</code></pre>
292+
<pre xml:space="preserve"><code class="language-php-template">&lt;link rel="stylesheet" media="screen" href="&lt;?php echo($thestyle);?&gt;.css"&gt;</code></pre>
293293
</section>
294294
<section id="body-section">
295295
<h5>In &lt;body&gt; section</h5>
296-
<pre xml:space="preserve"><code class="language-html">&lt;?php
296+
<pre xml:space="preserve"><code class="language-php-template">&lt;?php
297297
if ($thestyle == "style1") {
298298
echo "&lt;a href=\"index.php?set=style1\"&gt;Switch to Style Sheet Two&lt;/a&gt;";
299299
}

techniques/css/C35.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ <h3>A box sized with space to allow for expansion</h3>
3535
<p>The containers are sized to a value greater than the default width of the text.</p>
3636
<section id="the-css">
3737
<h4>The CSS</h4>
38-
<pre xml:space="preserve"><code class="language-css">&lt;style&gt;
39-
/* Links are less than 8ex wide,
40-
so 10ex width of each li allows for expanded letter and word width */
38+
<pre xml:space="preserve"><code class="language-html">&lt;style&gt;
39+
/* Links are less than 8em wide,
40+
so 10em width of each li allows for expanded letter and word width */
4141
nav li { width: 10em; }
4242
&lt;/style&gt;</code></pre>
4343
</section>
@@ -57,7 +57,7 @@ <h4>The <abbr title="HyperText Markup Language">HTML</abbr></h4>
5757
<h3>A box which expands with the text size</h3>
5858
<section id="the-css2">
5959
<h4>The CSS</h4>
60-
<pre xml:space="preserve"><code class="language-css">&lt;style&gt;
60+
<pre xml:space="preserve"><code class="language-html">&lt;style&gt;
6161
/* CSS containers are given a display of inline-block. No negative margins set. */
6262
nav li { display: inline-block; }
6363
&lt;/style&gt;</code></pre>

techniques/css/C36.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h2>Examples</h2>
2727
<h3>A paragraph expands vertically within container</h3>
2828
<section id="the-css">
2929
<h4>The CSS</h4>
30-
<pre xml:space="preserve"><code class="language-css">&lt;style&gt;
30+
<pre xml:space="preserve"><code class="language-html">&lt;style&gt;
3131
/* CSS: No height property is set.*/
3232
&lt;/style&gt;</code></pre>
3333
<h4>The <abbr title="HyperText Markup Language">HTML</abbr></h4>

techniques/failures/F100.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h3>Block an orientation ("door slam") by using HTML and CSS</h3>
3737

3838
When the <code>portrait</code> property matches the viewport space defined via media queries, the message will disappear or vice versa. This particular example uses the CSS <code>landscape</code>, <code>portrait</code> media query properties.</p>
3939

40-
<pre xml:space="preserve"><code class="language-css">&lt;style&gt;
40+
<pre xml:space="preserve"><code class="language-html">&lt;style&gt;
4141
/* Orientation "door slam" Styling */
4242

4343
@media all and (orientation: landscape) {

techniques/failures/F2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h3>Using CSS to style the <code>p</code> element to look like a heading</h3>
88

99
<p>The author intended to make a heading but didn't want the look of the default HTML heading. So they used CSS to style the P element to look like a heading and they called it a heading. But they failed to use the proper HTML heading element. Therefore, the Assistive Technology could not distinguish it as a heading.</p>
1010

11-
<pre xml:space="preserve"><code class="language-css">&lt;style&gt;
11+
<pre xml:space="preserve"><code class="language-html">&lt;style&gt;
1212
.heading1{
1313
font-family: Times, serif;
1414
font-size:200%;

techniques/failures/F3.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h3></h3>
7777
<pre xml:space="preserve"><code class="language-html">&lt;p id="bestinterest" style="background: transparent url(/images/TopRate.png) no-repeat top left;"&gt;
7878
Where else would you find a better interest rate?&lt;p&gt;</code></pre>
7979
<p>In the following code, the background image declaration is created in a client script:</p>
80-
<pre xml:space="preserve"><code class="language-javascript">&lt;script&gt;
80+
<pre xml:space="preserve"><code class="language-html">&lt;script&gt;
8181
var newP = document.createElement('p');
8282
var newPText = document.createTextNode('Where else would you find a better interest rate?');
8383
newP.appendChild(newPText);

techniques/failures/F37.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h3></h3>
1919
the form when a radio button is selected instead of using a submit
2020
button. </p>
2121

22-
<pre xml:space="preserve"><code class="language-javascript">&lt;script&gt;
22+
<pre xml:space="preserve"><code class="language-html">&lt;script&gt;
2323
function goToMirror(theInput) {
2424
var mirrorSite = "https://download." + theInput.value + "/";
2525
window.open(mirrorSite);

techniques/failures/F50.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<p>The following example uses script to blink content, but the blink
1111
continues indefinitely rather than stopping after five seconds.</p>
1212

13-
<pre xml:space="preserve"><code class="language-javascript">&lt;script&gt;
13+
<pre xml:space="preserve"><code class="language-html">&lt;script&gt;
1414
// blink "on" state
1515
function show(){
1616
document.getElementById("blink1").style.visibility = "visible";

0 commit comments

Comments
 (0)