|
1 | | -<!DOCTYPE html> |
2 | | -<html lang="en"> |
3 | | -<head> |
4 | | - <meta charset="utf-8"> |
5 | | - <title>Toggle Button Example</title> |
6 | | - |
7 | | - <!-- CSS and JS for this example. --> |
8 | | - <link rel="stylesheet" href="css/button.css"> |
9 | | - <script src="js/button.js"></script> |
10 | | -</head> |
11 | | -<body> |
12 | | - <main> |
13 | | - <h1>Toggle Button Example</h1> |
14 | | - |
15 | | - <p> |
16 | | - The following toggle button example demonstrates the <a href="https://w3c.github.io/aria-practices/#button">button design pattern.</a> |
17 | | - </p> |
18 | | - |
19 | | - <section> |
20 | | - <div class="example-header"> |
21 | | - <h2 id="ex_label">Example</h2> |
22 | | - </div> |
23 | | - |
24 | | - <div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div> |
25 | | - |
26 | | - <div id="example"> |
27 | | - <p style="display: none;">This <q>Print</q> action button uses a <code>div</code> element.</p> |
28 | | - <div style="display: none;" tabindex="-1" role="button" id="action">Print Page</div> |
29 | | - |
30 | | - <p>This <q>Mute</q> toggle button uses an <code>a</code> element.</p> |
31 | | - <a id="beforelink" href="#beforelink">Navigate forwards from here</a> |
32 | | - <a tabindex="0" role="button" id="toggle" aria-pressed="false"> |
33 | | - Mute |
34 | | - <svg aria-hidden="true" focusable="false"> |
35 | | - <use xlink:href="#icon-sound"></use> |
36 | | - </svg> |
37 | | - </a> |
38 | | - <a id="afterlink" href="#afterlink">Navigate backwards from here</a> |
39 | | - |
40 | | - <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none" id="svg_definitions"> |
41 | | - <defs> |
42 | | - <symbol id="icon-mute" viewBox="0 0 75 75"> |
43 | | - <polygon |
44 | | - id="polygon1" |
45 | | - points="39.389,13.769 22.235,28.606 6,28.606 6,47.699 21.989,47.699 39.389,62.75 39.389,13.769" |
46 | | - style="stroke:currentColor;stroke-width:5;stroke-linejoin:round;fill:currentColor;" /> |
47 | | - <path |
48 | | - id="path3003" |
49 | | - d="M 48.651772,50.269646 69.395223,25.971024" |
50 | | - style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round" /> |
51 | | - <path |
52 | | - id="path3003-1" |
53 | | - d="M 69.395223,50.269646 48.651772,25.971024" |
54 | | - style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
55 | | - </symbol> |
56 | | - <symbol id="icon-sound" viewBox="0 0 75 75"> |
57 | | - <polygon points="39.389,13.769 22.235,28.606 6,28.606 6,47.699 21.989,47.699 39.389,62.75 39.389,13.769" |
58 | | - style="stroke:currentColor;stroke-width:5;stroke-linejoin:round;fill:currentColor;"/> |
59 | | - <path d="M 48.128,49.03 C 50.057,45.934 51.19,42.291 51.19,38.377 C 51.19,34.399 50.026,30.703 48.043,27.577" |
60 | | - style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
61 | | - <path d="M 55.082,20.537 C 58.777,25.523 60.966,31.694 60.966,38.377 C 60.966,44.998 58.815,51.115 55.178,56.076" |
62 | | - style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
63 | | - <path d="M 61.71,62.611 C 66.977,55.945 70.128,47.531 70.128,38.378 C 70.128,29.161 66.936,20.696 61.609,14.01" |
64 | | - style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
65 | | - </symbol> |
66 | | - </defs> |
67 | | - </svg> |
68 | | - |
69 | | - </div> |
70 | | - |
71 | | - <div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div> |
72 | | - </section> |
73 | | - </main> |
74 | | -</body> |
75 | | -</html> |
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <title>Toggle Button Example</title> |
| 6 | + |
| 7 | + <!-- CSS and JS for this example. --> |
| 8 | + <link rel="stylesheet" href="css/button.css"> |
| 9 | + <script src="js/button.js"></script> |
| 10 | +</head> |
| 11 | +<body> |
| 12 | + <main> |
| 13 | + <h1>Toggle Button Example</h1> |
| 14 | + |
| 15 | + <p> |
| 16 | + The following toggle button example demonstrates the <a href="https://w3c.github.io/aria-practices/#button">button design pattern.</a> |
| 17 | + </p> |
| 18 | + |
| 19 | + <section> |
| 20 | + <div class="example-header"> |
| 21 | + <h2 id="ex_label">Example</h2> |
| 22 | + </div> |
| 23 | + |
| 24 | + <div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div> |
| 25 | + |
| 26 | + <div id="example"> |
| 27 | + <p style="display: none;">This <q>Print</q> action button uses a <code>div</code> element.</p> |
| 28 | + <div style="display: none;" tabindex="-1" role="button" id="action">Print Page</div> |
| 29 | + |
| 30 | + <p>This <q>Mute</q> toggle button uses an <code>a</code> element.</p> |
| 31 | + <a id="beforelink" href="#beforelink">Navigate forwards from here</a> |
| 32 | + <a tabindex="0" role="button" id="toggle" aria-pressed="false"> |
| 33 | + Mute |
| 34 | + <svg aria-hidden="true" focusable="false"> |
| 35 | + <use xlink:href="#icon-sound"></use> |
| 36 | + </svg> |
| 37 | + </a> |
| 38 | + <a id="afterlink" href="#afterlink">Navigate backwards from here</a> |
| 39 | + |
| 40 | + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none" id="svg_definitions"> |
| 41 | + <defs> |
| 42 | + <symbol id="icon-mute" viewBox="0 0 75 75"> |
| 43 | + <polygon |
| 44 | + id="polygon1" |
| 45 | + points="39.389,13.769 22.235,28.606 6,28.606 6,47.699 21.989,47.699 39.389,62.75 39.389,13.769" |
| 46 | + style="stroke:currentColor;stroke-width:5;stroke-linejoin:round;fill:currentColor;" /> |
| 47 | + <path |
| 48 | + id="path3003" |
| 49 | + d="M 48.651772,50.269646 69.395223,25.971024" |
| 50 | + style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round" /> |
| 51 | + <path |
| 52 | + id="path3003-1" |
| 53 | + d="M 69.395223,50.269646 48.651772,25.971024" |
| 54 | + style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
| 55 | + </symbol> |
| 56 | + <symbol id="icon-sound" viewBox="0 0 75 75"> |
| 57 | + <polygon points="39.389,13.769 22.235,28.606 6,28.606 6,47.699 21.989,47.699 39.389,62.75 39.389,13.769" |
| 58 | + style="stroke:currentColor;stroke-width:5;stroke-linejoin:round;fill:currentColor;"/> |
| 59 | + <path d="M 48.128,49.03 C 50.057,45.934 51.19,42.291 51.19,38.377 C 51.19,34.399 50.026,30.703 48.043,27.577" |
| 60 | + style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
| 61 | + <path d="M 55.082,20.537 C 58.777,25.523 60.966,31.694 60.966,38.377 C 60.966,44.998 58.815,51.115 55.178,56.076" |
| 62 | + style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
| 63 | + <path d="M 61.71,62.611 C 66.977,55.945 70.128,47.531 70.128,38.378 C 70.128,29.161 66.936,20.696 61.609,14.01" |
| 64 | + style="fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round"/> |
| 65 | + </symbol> |
| 66 | + </defs> |
| 67 | + </svg> |
| 68 | + |
| 69 | + </div> |
| 70 | + |
| 71 | + <div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div> |
| 72 | + </section> |
| 73 | + </main> |
| 74 | +</body> |
| 75 | +</html> |
0 commit comments