-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathreadonly03.html
95 lines (94 loc) · 3.71 KB
/
readonly03.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
92
93
94
95
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>aria-readonly attribute on input</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>aria-readonly</code> attribute on <code><input></code></h1>
<p>← <a href="index.html">Return to main list</a></p>
<p>The boolean <a href="https://www.w3.org/TR/wai-aria-1.1/#aria-readonly" target="_blank"><code>aria-readonly</code></a> attribute makes the element not mutable (not changable), meaning the user can not edit the control. </p>
<h2>Example with aria-readonly</h2>
<form action="#">
<div class="form-group">
<label class="label" for="aaa">Full name</label>
<input class="input" id="aaa" type="text" value="Hello" aria-readonly="false">
</div>
</form>
<h2>Example with aria-readonly</h2>
<form action="#">
<div class="form-group">
<label class="label" for="bbb">Full name</label>
<input class="input" id="bbb" type="text" value="Hello" aria-readonly="false">
</div>
</form>
<h2>Code</h2>
<!-- start code -->
<pre><code><div class="form-group">
<label for="aaa">Full name</label>
<input id="aaa" type="text" value="Hello" aria-readonly="true">
</div>
<div class="form-group">
<label for="bbb">Full name</label>
<input id="bbb" type="text" value="Hello">
</div>
</code></pre>
<!-- end code -->
<h2>Assistive technologies</h2>
<div class="note">
<h3>VoiceOver</h3>
<ul class="browser-list">
<li><b>Chrome:</b><br>
Hello. Content selected. Full name. Edit text. <span class="red">[readonly not announced]</span><br>
Hello. Content selected. Full name. Edit text.</span>
</li>
<li><b>Firefox:</b><br>
Hello. Insertion on word: Hello. between characters: and Full name. Edit text. <span class="red">[readonly not announced]</span><br>
Hello. Insertion on word: Hello. between characters: and Full name. Edit text.</span>
</li>
<li><b>Safari:</b><br>
Hello. Content selected. Full name. Edit text. <span class="red">[readonly not announced]</span><br>
Hello. Content selected. Full name. Edit text.</span>
</li>
</ul>
</div>
<div class="note">
<h3>NVDA</h3>
<ul class="browser-list">
<li><b>Chrome:</b><br>
Full name. Edit. Selected. Hello. <span class="red">[readonly not announced]</span><br>
Full name. Edit. Selected. Hello.
</li>
<li><b>Firefox:</b><br>
Full name. Edit with autocomplete. Selected. Hello. <span class="red">[readonly not announced]</span><br>
Full name. Edit with autocomplete. Selected. Hello.
</li>
<li><b>Edge:</b><br>
Full name. Edit. Selected. Hello. <span class="red">[readonly not announced]</span><br>
Full name. Edit. Selected. Hello.
</li>
</ul>
</div>
<div class="note">
<h3>JAWS</h3>
<ul class="browser-list">
<li><b>Chrome:</b><br>
Full name. Edit. Hello. Type in text. <span class="red">[readonly not announced]</span><br>
Full name. Edit. Hello. Type in text.<br>
</li>
<li><b>Firefox:</b><br>
Full name. Edit. Hello. Type in text. <span class="red">[readonly not announced]</span><br>
Full name. Edit. Hello. Type in text.<br>
</li>
<li><b>Edge:</b><br>
Full name. Full name. Edit. Hello. Type in text. <span class="red">[readonly not announced]</span><br>
Full name. Edit. Hello. Type in text.<br>
</li>
</ul>
</div>
<p>← <a href="index.html">Return to main list</a></p>
</body>
</html>