-
Notifications
You must be signed in to change notification settings - Fork 21
/
fieldset-checkbox-group-presentation.html
81 lines (81 loc) · 3.75 KB
/
fieldset-checkbox-group-presentation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Checkbox group with list and role="presentation"</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico">
<link href="assets/css/examples.css" rel="stylesheet">
</head>
<body>
<h1>Checkbox group with list and <code>role="presentation"</code></h1>
<p>← <a href="index.html">Return to main list</a></p>
<p>This is a test case designed to determine how the <a href="https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element" target="_blank"><code><fieldset></code></a> and <a href="https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element" target="_blank"><code><legend></code></a> elements are announced in relation to a checkbox group by various screen readers. In this test, the checkbox group is presented inside a list, which has been set with <a href="https://www.w3.org/TR/wai-aria/#presentation" target="_blank"><code>role="presentation"</code></a>.</p>
<h2>Example</h2>
<form action="#">
<fieldset>
<legend>Favourite animal</legend>
<ul class="form-list" role="presentation">
<li>
<input type="checkbox" id="dog">
<label for="dog">Dog</label>
</li>
<li>
<input type="checkbox" id="cat">
<label for="cat">Cat</label>
</li>
<li>
<input type="checkbox" id="rabbit">
<label for="rabbit">Rabbit</label>
</li>
</ul>
</fieldset>
</form>
<h2>Code</h2>
<!-- start code -->
<pre><code><fieldset>
<legend>Favourite animal</legend>
<ul role="presentation">
<li>
<input type="checkbox" id="dog">
<label for="dog">Dog</label>
</li>
<li>
<input type="checkbox" id="cat">
<label for="cat">Cat</label>
</li>
<li>
<input type="checkbox" id="rabbit">
<label for="rabbit">Rabbit</label>
</li>
</ul>
</fieldset></code></pre>
<!-- end code -->
<h2>Assistive technologies</h2>
<div class="note">
<h3>VoiceOver</h3>
<ul class="browser-list">
<li><b>Chrome:</b> Dog. Unticked. Tick box. <span class="green">Favourite animal</span>. <span class="green">Group</span>.</li>
<li><b>Firefox:</b> Dog. Unticked. Checkbox. <span class="green">Favourite animal</span>. <span class="green">Group</span>.</li>
<li><b>Safari:</b> Dog. Unticked. Tick box. <span class="red">Favourite animal</span>. <span class="green">Favourite animal</span>. <span class="green">Group</span>. <span class="red">[Legend announced twice]</span></li>
</ul>
</div>
<div class="note">
<h3>NVDA</h3>
<ul class="browser-list">
<li><b>Chrome:</b> <span class="green">Favourite animal</span>. <span class="green">Grouping</span>. Dog. Checkbox. Not checked.</li>
<li><b>Firefox:</b> <span class="green">Favourite animal</span>. <span class="green">Grouping</span>. Dog. Checkbox. Not checked.</li>
<li><b>Edge:</b> <span class="green">Favourite animal</span>. <span class="green">Grouping</span>. Dog. Checkbox. Not checked.</li>
</ul>
</div>
<div class="note">
<h3>JAWS</h3>
<ul class="browser-list">
<li><b>Chrome:</b> <span class="green">Favourite animal</span>. <span class="green">Group</span>. Dog. Checkbox. Not checked.</li>
<li><b>Firefox:</b> <span class="green">Favourite animal</span>. Dog. Checkbox. Not checked.</li>
<li><b>Edge:</b> <span class="green">Favourite animal</span>. <span class="green">Group</span>. Dog. Checkbox. Not checked.</li>
</ul>
</div>
<p>← <a href="index.html">Return to main list</a></p>
</body>
</html>