-
Notifications
You must be signed in to change notification settings - Fork 21
/
fieldset-error02.html
71 lines (71 loc) · 3.49 KB
/
fieldset-error02.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Radio group with error - aria-describedby applied to fieldset</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>Radio group with error - <code>aria-describedby</code> applied to <code><fieldset></code></h1>
<p>← <a href="index.html">Return to main list</a></p>
<p>This is a test case designed to determine how an error message associated with a radio group will be announced by various screen readers.</p>
<h2>Example</h2>
<form action="#">
<fieldset aria-describedby="e01">
<legend>Do you like boats?</legend>
<div class="form-group">
<input type="radio" id="boats-y" name="boats">
<label for="boats-y">Yes</label>
</div>
<div class="form-group">
<input type="radio" id="boats-n" name="boats">
<label for="boats-n">No</label>
</div>
<p class="error-message" id="e01">Error: Choose at least one option</p>
</fieldset>
</form>
<h2>Code</h2>
<!-- start code -->
<pre><code><fieldset aria-describedby="e01">
<legend>Do you like boats?</legend>
<div class="form-group">
<input type="radio" id="boats-y" name="boats">
<label for="boats-y">Yes</label>
</div>
<div class="form-group">
<input type="radio" id="boats-n" name="boats">
<label for="boats-n">No</label>
</div>
<p class="error-message" id="e01">Error: Choose at least one option</p>
</fieldset></code></pre>
<!-- end code -->
<h2>Assistive technologies</h2>
<div class="note">
<h3>VoiceOver</h3>
<ul class="browser-list">
<li><b>Chrome:</b> Yes. Radio button. 1 of 2. Do you like boats? Group. <span class="red">[Error message not announced]</span></li>
<li><b>Firefox:</b> Yes. Radio button. 1 of 2. Do you like boats? Group. <span class="red">[Error message not announced]</span></li>
<li><b>Safari:</b> Yes. Radio button. 1 of 2. Do you like boats? Do you like boats? Group. <span class="red">[Error message not announced]</span></li>
</ul>
</div>
<div class="note">
<h3>NVDA</h3>
<ul class="browser-list">
<li><b>Chrome:</b> Do you like boats? Grouping. <span class="green">Error: Choose at least one option</span>. Yes. Radio button. Not checked. 1 of 2.</li>
<li><b>Firefox:</b> Do you like boats? Grouping. <span class="green">Error: Choose at least one option</span>. Yes. Radio button. Not checked. 1 of 2.</li>
<li><b>Edge:</b> Do you like boats? Grouping. <span class="green">Error: Choose at least one option</span>. Yes. Radio button. Not checked. 1 of 2.</li>
</ul>
</div>
<div class="note">
<h3>JAWS</h3>
<ul class="browser-list">
<li><b>Chrome:</b> Do you like boats? Group. <span class="green">Error: Choose at least one option</span>. Yes. Radio button. Not checked. 1 of 2.</li>
<li><b>Firefox:</b> To change the selection use the up or down arrow. Do you like boats? <span class="green">Error: Choose at least one option</span>. Yes. Radio button. Not checked. Yes. Radio button. Not checked. 1 of 2.</li>
<li><b>Edge:</b> Do you like boats? Group. <span class="green">Error: Choose at least one option</span>. Yes. Radio button. Not checked. 1 of 2.</li>
</ul>
</div>
<p>← <a href="index.html">Return to main list</a></p>
</body>
</html>