You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: techniques/client-side-script/SCR37.html
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ <h3>An options button that opens a dialog</h3>
22
22
<p>The triggering element is a button and the script is triggered from the onclick event. This sends the appropriate events to the operating system so that assistive technology is aware of the change in the DOM. </p>
23
23
<p>In this example, the Submit and Reset buttons inside the dialog simply hide the <code>div</code>. </p>
24
24
25
-
<pre><code>...
25
+
<pre><codeclass="language-html">...
26
26
<button onclick="TogglePopup(event,true)"
27
27
name="pop0001">Options</button>
28
28
@@ -46,7 +46,7 @@ <h3>An options button that opens a dialog</h3>
46
46
47
47
<p>The <code>div</code>, heading and <code>form</code> elements are styled with CSS to look like a dialog. </p>
48
48
49
-
<pre><code>...
49
+
<pre><codeclass="language-css">...
50
50
a { color:blue; }
51
51
a.clickPopup img { border:none; width:0; }
52
52
@@ -63,7 +63,7 @@ <h3>An options button that opens a dialog</h3>
63
63
64
64
<p>The script toggles the display of the popup <code>div</code>, showing it and hiding it. </p>
Copy file name to clipboardExpand all lines: techniques/css/C15.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ <h3>Link elements</h3>
48
48
<h3>Highlighting elements that receive focus</h3>
49
49
<p>In this example, the :focus pseudo-class is used to change the style applied to input fields when they receive focus by changing the background color.</p>
Copy file name to clipboardExpand all lines: techniques/css/C43.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ <h3>Using CSS <code>scroll-padding</code> to un-obscure content</h3>
30
30
<p>This example demonstrates a technique to un-obscure content underneath a fixed-position banner. To prevent the page becoming unusable at smaller screen sizes, the banner becomes un-fixed. To observe the <code>scroll-padding</code> effect you will need to use a viewport over 800px wide.</p>
31
31
</aside>
32
32
<p>Working example: <ahref="../../working-examples/css-padding-focus-not-obscured/">Using CSS <code>scroll-padding</code> to un-obscure content</a>.</p>
<p>By default, in all modern browsers, this button does not show any focus indication when activated using a mouse/pointer. Browsers show their default focus outline/indication when a user sets focus on the button using <kbd>Tab</kbd>.</p>
37
37
<p>In order to make this focus indication more prominent, we use the <code>:focus-visible</code> pseudo-class selector to define a more intentional and pronounced focus style.</p>
38
38
<p>Working example: <ahref="../../working-examples/css-focus-visible/">Using CSS <code>:focus-visible</code> to provide keyboard focus indication</a>.</p>
Copy file name to clipboardExpand all lines: techniques/failures/F111.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ <h2>Examples</h2>
30
30
<sectionclass="example">
31
31
<h3>A text input with a visible label, but without an accessible name</h3>
32
32
<p>The text input is preceded by a visible text label "Enter name", but the text is not marked up as a <code><label></code> for the input, and there is no alternative way (e.g., <code>aria-label</code>) to provide the input with an accessible name at all.</p>
33
-
<pre><code>
33
+
<pre><codeclass="language-html">
34
34
<p>Enter name</p>
35
35
<input type="text">
36
36
</code></pre>
@@ -39,7 +39,7 @@ <h3>A text input with a visible label, but without an accessible name</h3>
39
39
<sectionclass="example">
40
40
<h3>A text input with a visible label and aria-labelledby pointing to a non-existent id</h3>
41
41
<p>The text input is preceded by a visible text label "Enter name". The text's container has an <code>id</code> of <code>nameEntry</code>, but the input has an <code>aria-labelledby</code> referencing a non-existent <code>name-entry</code><code>id</code>. As a result, the input lacks an accessible name altogether.</p>
Copy file name to clipboardExpand all lines: techniques/failures/F71.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,14 @@ <h3>Characters </h3>
12
12
13
13
<p>The following word looks, in browsers with appropriate font support, like the English word "cook", yet is composed of the string <code>U+03f2 U+043E U+03BF U+006B</code>, only one of which is a letter from the Western alphabet. This word will not be processed meaningfully, and a text alternative is not provided.</p>
14
14
15
-
<prexml:space="preserve"><code>ϲоοk</code></pre>
15
+
<pre>ϲоοk</pre>
16
16
</section>
17
17
<sectionclass="example">
18
18
<h3>Character entities</h3>
19
19
20
20
<p>The following example, like its predecessor, will look like the English word "cook" when rendered in browsers with appropriate font support. In this case, the characters are implemented with character entities, but the word will still not be processed meaningfully, and a text alternative is not provided.</p>
Copy file name to clipboardExpand all lines: techniques/general/G224.html
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ <h2>Examples</h2>
24
24
<sectionclass="example">
25
25
<p>A website conveys information in a nested list format. The understandability of the list hierarchy is supported by the indentation of the list content. While it is important for the individual list item text to reflow, the list hierarchy would suffer if flattened so that all content would fit within a 320 CSS pixel wide viewport.</p>
26
26
<p>The following example list contains additional nested lists to provide more context for each of the parent list item's text. To maintain the visual hierarchy, the indentation of each list level remains present, but modified once an author defined CSS breakpoint is met. Additional styles are set for different breakpoints to mitigate against the potential for content to extend beyond a 320px wide viewport, while accounting for visual spacing against the borders of the viewport, to attempt to make the content not feel cramped. At the smallest breakpoint, the content of list items receive a minimum width to mitigate against potentially "squished" content lists with many nested levels. At this breakpoint, each nested list level can be horizontally scrolled into view, and once a nested list is visible within the viewport, only vertical scrolling will be necessary to read the content of the nested list's items.</p>
27
-
<pre><code>
27
+
<pre><codeclass="language-html">
28
28
<div class="example">
29
29
<ul>
30
30
<li>
@@ -56,7 +56,7 @@ <h2>Examples</h2>
56
56
</ul>
57
57
</div>
58
58
</code></pre>
59
-
<pre><code>
59
+
<pre><codeclass="language-css">
60
60
*, *::before, *::after {
61
61
box-sizing: border-box;
62
62
}
@@ -92,7 +92,7 @@ <h2>Examples</h2>
92
92
<p>As a user zooms in the web page, the CSS of the indentation can be adjusted to maintain this necessary structure, while also allowing more text to be visible on a single line.</p>
93
93
94
94
<p>The following represents a Python code example. The indentation of each line of text is necessary to create a group of statements that are executed as a block.</p>
95
-
<pre><code>
95
+
<pre><codeclass="language-python">
96
96
def complex_function(x):
97
97
if x > 0:
98
98
for i in range(x):
@@ -114,7 +114,7 @@ <h2>Examples</h2>
114
114
print("x is not a positive number")
115
115
</code></pre>
116
116
<p>The following code example demonstrates the use of indentation to convey the nesting of elements in an HTML document:</p>
117
-
<pre><code>
117
+
<pre><codeclass="language-html">
118
118
<html lang=en>
119
119
<head>...</head>
120
120
<body>
@@ -125,7 +125,7 @@ <h2>Examples</h2>
125
125
</html>
126
126
</code></pre>
127
127
<p>The indentation of code blocks like these could be adjusted at different viewport sizes, via a CSS Media Query.</p>
0 commit comments