-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathforms-buttons.html
87 lines (75 loc) · 4.78 KB
/
forms-buttons.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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Accessibility Library</title>
<link href="https://fonts.googleapis.com/css?family=Nunito:400,600,700,800|Roboto:400,500,700" rel="stylesheet" />
<link type="text/css" href="assets/css/theme.css" rel="stylesheet" />
<link type="text/css" href="assets/css/main.css" rel="stylesheet" />
<style type="text/css">
button[aria-disabled] {
opacity: .5;
}
</style>
</head>
<body>
<div class="page">
<header>
<a href="/" class="title text-dark">Accessibility Library</a>
<div class="lvivcss-logo">
<img src="./assets/images/lviv-css-logo.png" alt="" height="24" />
</div>
</header>
<nav>
<ul>
<li><a href="#">Aria attributes</a></li>
<li><a href="#">Live example</a></li>
<li><a href="#">Code sample</a></li>
</ul>
</nav>
<main>
<h1>Form buttons</h1>
<p>
The label of a <b>button</b> element is set inside the element and can include markup. This allows more advanced accessibility hints to be included, like marking up language change.
</p>
<h2 class="mt-sm">Aria attributes</h2>
<table>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><code>aria-disabled</code></td>
<td>Indicates when the action associated with a button is unavailable.</td>
</tr>
<tr>
<td><code>aria-pressed</code></td>
<td>Indicates when the button is toggled on.</td>
</tr>
aria-pressed
</table>
<h2 class="mt-sm">Live Example</h2>
<section>
<form>
<input type="text" name="name" required="" aria-label="First name"><br><br>
<button type="submit" aria-disabled="true">Submit</button>
<button>Cancel</button>
</form>
</section>
<h2 class="mt-sm">Code sample</h2>
<section>
<pre style="color:#000000;background:#ffffff;"><span style="color:#a65700; "><</span><span style="color:#800000; font-weight:bold; ">form</span><span style="color:#a65700; ">></span>
<span style="color:#a65700; "><</span><span style="color:#800000; font-weight:bold; ">input</span><span style="color:#274796; "> </span><span style="color:#074726; ">type</span><span style="color:#808030; ">=</span><span style="color:#0000e6; ">"text"</span><span style="color:#274796; "> </span><span style="color:#074726; ">name</span><span style="color:#808030; ">=</span><span style="color:#0000e6; ">"name"</span><span style="color:#274796; "> </span><span style="color:#074726; ">required</span><span style="color:#808030; ">=</span><span style="color:#0000e6; ">""</span><span style="color:#274796; "> aria-</span><span style="color:#074726; ">label</span><span style="color:#808030; ">=</span><span style="color:#0000e6; ">"First name"</span><span style="color:#a65700; ">></span><span style="color:#a65700; "><</span><span style="color:#800000; font-weight:bold; ">br</span><span style="color:#a65700; ">></span><span style="color:#a65700; "><</span><span style="color:#800000; font-weight:bold; ">br</span><span style="color:#a65700; ">></span>
<span style="color:#a65700; "><</span><span style="color:#800000; font-weight:bold; ">button</span><span style="color:#274796; "> </span><span style="color:#074726; ">type</span><span style="color:#808030; ">=</span><span style="color:#0000e6; ">"submit"</span><span style="color:#274796; "> aria-</span><span style="color:#074726; ">disabled</span><span style="color:#808030; ">=</span><span style="color:#0000e6; ">"true"</span><span style="color:#a65700; ">></span>Submit<span style="color:#a65700; "></</span><span style="color:#800000; font-weight:bold; ">button</span><span style="color:#a65700; ">></span>
<span style="color:#a65700; "><</span><span style="color:#800000; font-weight:bold; ">button</span><span style="color:#a65700; ">></span>Cancel<span style="color:#a65700; "></</span><span style="color:#800000; font-weight:bold; ">button</span><span style="color:#a65700; ">></span>
<span style="color:#a65700; "></</span><span style="color:#800000; font-weight:bold; ">form</span><span style="color:#a65700; ">></span>
</pre>
</section>
</main>
<footer>
Accessibility Library created by <mark>YOUR NAME</mark> on LvivCSS'19.
</footer>
</div>
</body>
</html>