-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathaccessible-description-table01.html
91 lines (91 loc) · 3.32 KB
/
accessible-description-table01.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
82
83
84
85
86
87
88
89
90
91
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>table where "aria-describedby" should be accessible description</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><code><table></code> where <code>aria-describedby</code> should be accessible description</h1>
<p>← <a href="index.html">Return to main list</a></p>
<p>The purpose this test is to show the cascade order of how accessible descriptions are applied in the accessibility tree for the <code><table></code> element. The priority order from highest to lowest is:</p>
<ol>
<li><b>If present, use <code>aria-describedby</code> value (as per the "Cat" example below)</b>.</li>
<li><a href="accessible-description-table02.html">Otherwise, if present, use <code>title</code> value</a>.</li>
<li><a href="accessible-description-table03.html">If none of the above are provided, there is no accessible description.</a></li>
</ol>
<p>This example should not be considered proper practice, and is for testing purposes only.</p>
<h2>Example</h2>
<table aria-describedby="a">
<caption>Animals</caption>
<thead>
<tr>
<th>Fishes</th>
<th>Birds</th>
</tr>
</thead>
<tbody>
<tr>
<td>Snapper</td>
<td>Starling</td>
</tr>
<tr>
<td>Salmon</td>
<td>Eagle</td>
</tr>
</tbody>
</table>
<p id="a">Cat</p>
<h2>Code</h2>
<!-- start code -->
<pre><code><table aria-describedby="a">
<caption>Animals</caption>
<thead>
<tr>
<th>Fishes</th>
<th>Birds</th>
</tr>
</thead>
<tbody>
<tr>
<td>Snapper</td>
<td>Starling</td>
</tr>
<tr>
<td>Salmon</td>
<td>Eagle</td>
</tr>
</tbody>
</table>
<p id="a">Cat</p></code></pre>
<!-- end code -->
<h2>Assistive technologies</h2>
<div class="note">
<h3>VoiceOver</h3>
<ul class="browser-list">
<li><b>Chrome:</b> Animals. Table. 2 Columns. 3 rows. <span class="green">Cat</span>.</li>
<li><b>Firefox:</b> Animals. Table. 2 Columns. 3 rows. <span class="green">Cat</span>.</li>
<li><b>Safari:</b> Animals. Table. 2 Columns. 3 rows. <span class="green">Cat</span>.</li>
</ul>
</div>
<div class="note">
<h3>NVDA</h3>
<ul class="browser-list">
<li><b>Chrome:</b> Table with 3 rows and 2 columns. <span class="green">Cat</span>.</li>
<li><b>Firefox:</b> Table with 3 rows and 2 columns. <span class="green">Cat</span>.</li>
<li><b>Safari:</b> Table with 3 rows and 2 columns. <span class="green">Cat</span>.</li>
</ul>
</div>
<div class="note">
<h3>JAWS</h3>
<ul class="browser-list">
<li><b>Chrome:</b> <span class="green">Summary: Cat</span>. Table with 2 columns and 3 rows.</li>
<li><b>Firefox:</b> <span class="green">Summary: Cat</span>. Table with 2 columns and 3 rows.</li>
<li><b>Safari:</b> <span class="green">Summary: Cat</span>. Table with 2 columns and 3 rows.</li>
</ul>
</div>
<p>← <a href="index.html">Return to main list</a></p>
</body>
</html>