|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <title>Checkbox group with role="group"</title> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <link rel="shortcut icon" href="favicon.ico"> |
| 8 | + <link href="assets/css/examples.css" rel="stylesheet"> |
| 9 | +</head> |
| 10 | +<body> |
| 11 | + <h1>Checkbox group with <code>role="group"</code></h1> |
| 12 | + <p>← <a href="index.html">Return to main list</a></p> |
| 13 | + <p>This is a test case designed to determine how the <a href="https://www.w3.org/TR/wai-aria-1.1/#group" target="_blank"><code>group</code></a> role is announced in relation to a checkbox group by various screen readers.</p> |
| 14 | + <h2>Example</h2> |
| 15 | + <form action="#"> |
| 16 | + <div role="group" aria-labelledby="group-heading"> |
| 17 | + <h3 id="group-heading">Favourite animal</h3> |
| 18 | + <div class="form-group"> |
| 19 | + <input type="checkbox" id="dog"> |
| 20 | + <label for="dog">Dog</label> |
| 21 | + </div> |
| 22 | + <div class="form-group"> |
| 23 | + <input type="checkbox" id="cat"> |
| 24 | + <label for="cat">Cat</label> |
| 25 | + </div> |
| 26 | + <div class="form-group"> |
| 27 | + <input type="checkbox" id="rabbit"> |
| 28 | + <label for="rabbit">Rabbit</label> |
| 29 | + </div> |
| 30 | + </div> |
| 31 | + </form> |
| 32 | + <h2>Code</h2> |
| 33 | +<!-- start code --> |
| 34 | +<pre><code><div role="group" aria-labelledby="group-heading"> |
| 35 | + <h3 id="group-heading">Favourite animal</h3> |
| 36 | + <div class="form-group"> |
| 37 | + <input type="checkbox" id="dog"> |
| 38 | + <label for="dog">Dog</label> |
| 39 | + </div> |
| 40 | + <div class="form-group"> |
| 41 | + <input type="checkbox" id="cat"> |
| 42 | + <label for="cat">Cat</label> |
| 43 | + </div> |
| 44 | + <div class="form-group"> |
| 45 | + <input type="checkbox" id="rabbit"> |
| 46 | + <label for="rabbit">Rabbit</label> |
| 47 | + </div> |
| 48 | +</div></code></pre> |
| 49 | +<!-- end code --> |
| 50 | + <h2>Assistive technologies</h2> |
| 51 | + <div class="note"> |
| 52 | + <h3>VoiceOver</h3> |
| 53 | + <ul class="browser-list"> |
| 54 | + <li><b>Chrome:</b> Dog. Unticked. Tick box. <span class="green">Favourite animal</span>. <span class="green">Group</span>.</li> |
| 55 | + <li><b>Firefox:</b> Dog. Unticked. Checkbox. <span class="green">Favourite animal</span>. <span class="green">Group</span>.</li> |
| 56 | + <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> |
| 57 | + </ul> |
| 58 | + </div> |
| 59 | + <div class="note"> |
| 60 | + <h3>NVDA</h3> |
| 61 | + <ul class="browser-list"> |
| 62 | + <li><b>Chrome:</b> <span class="green">Favourite animal</span>. <span class="green">Grouping</span>. Dog. Checkbox. Not checked.</li> |
| 63 | + <li><b>Firefox:</b> <span class="green">Favourite animal</span>. <span class="green">Grouping</span>. Dog. Checkbox. Not checked.</li> |
| 64 | + <li><b>Edge:</b> <span class="green">Favourite animal</span>. <span class="green">Grouping</span>. Dog. Checkbox. Not checked.</li> |
| 65 | + </ul> |
| 66 | + </div> |
| 67 | + <div class="note"> |
| 68 | + <h3>JAWS</h3> |
| 69 | + <ul class="browser-list"> |
| 70 | + <li><b>Chrome:</b> <span class="green">Favourite animal</span>. <span class="green">Group</span>. Dog. Checkbox. Not checked.</li> |
| 71 | + <li><b>Firefox:</b> <span class="green">Favourite animal</span>. Dog. Checkbox. Not checked.</li> |
| 72 | + <li><b>Edge:</b> <span class="green">Favourite animal</span>. <span class="green">Group</span>. Dog. Checkbox. Not checked.</li> |
| 73 | + </ul> |
| 74 | + </div> |
| 75 | + <p>← <a href="index.html">Return to main list</a></p> |
| 76 | +</body> |
| 77 | +</html> |
0 commit comments