|
70 | 70 | <section |
71 | 71 | class="bg display:flex justify-content:center align-items:center width:100% min-height:100vh"> |
72 | 72 | <div class="flex-grow:1 max-width:400px"> |
73 | | - <form array="users" id="signin"> |
74 | | - <div |
75 | | - class="display:flex justify-content:space-between padding:20px background:white background:#222@dark"> |
76 | | - <h3>Sign In</h3> |
77 | | - <i |
78 | | - class="font-size:70px" |
79 | | - src="../assets/svg/sign-in-alt.svg"></i> |
| 73 | + <!-- Sign-in form: improved semantics, autocomplete and accessibility --> |
| 74 | + <form array="users" id="signin" role="form" aria-label="Sign in to CoCreate" autocomplete="on"> |
| 75 | + <div class="display:flex justify-content:space-between padding:20px background:white background:#222@dark"> |
| 76 | + <h1>Sign In</h1> |
| 77 | + <i class="font-size:70px" src="../assets/svg/sign-in-alt.svg" aria-hidden="true"></i> |
80 | 78 | </div> |
81 | | - <div |
82 | | - class="padding:20px background:gainsboro background:#444@dark"> |
| 79 | + <div class="padding:20px background:gainsboro background:#444@dark"> |
83 | 80 | <floating-label> |
84 | 81 | <input |
85 | 82 | type="email" |
| 83 | + id="signin-email" |
| 84 | + name="email" |
86 | 85 | key="email" |
87 | 86 | placeholder="Email" |
88 | 87 | class="floating-label" |
89 | 88 | required |
90 | | - email /> |
| 89 | + autocomplete="email" |
| 90 | + aria-required="true" |
| 91 | + aria-label="Email address" /> |
91 | 92 | </floating-label> |
92 | 93 |
|
93 | 94 | <floating-label> |
94 | 95 | <input |
95 | 96 | type="password" |
| 97 | + id="signin-password" |
| 98 | + name="password" |
96 | 99 | key="password" |
97 | 100 | placeholder="Password" |
98 | 101 | class="floating-label" |
99 | | - required /> |
| 102 | + required |
| 103 | + autocomplete="current-password" |
| 104 | + aria-required="true" |
| 105 | + aria-label="Password" /> |
100 | 106 | <a |
101 | 107 | click-query="$previous" |
102 | 108 | click-attribute="type" |
103 | 109 | click-value="text, password" |
104 | | - class="floating-icon"> |
| 110 | + class="floating-icon" |
| 111 | + aria-label="Toggle password visibility" |
| 112 | + role="button"> |
105 | 113 | <i |
106 | 114 | click-attribute="src" |
107 | 115 | click-value="../assets/svg/eye-slash.svg, ../assets/svg/eye.svg" |
108 | 116 | src="../assets/svg/eye.svg" |
109 | | - class="width:20px height:20px"></i> |
| 117 | + class="width:20px height:20px" |
| 118 | + aria-hidden="true"></i> |
110 | 119 | </a> |
111 | 120 | </floating-label> |
112 | 121 |
|
113 | | - <button |
114 | | - actions="validate, signIn" |
115 | | - href="index.html"> |
116 | | - Sign In |
117 | | - </button> |
| 122 | + <button type="button" actions="validate, signIn" aria-label="Sign in to CoCreate">Sign In</button> |
118 | 123 |
|
119 | | - <a show="#forgotpass" hide="#signin" |
120 | | - >Forgot Password?</a |
121 | | - > |
| 124 | + <a show="#forgotpass" hide="#signin">Forgot Password?</a> |
122 | 125 | </div> |
123 | 126 | </form> |
124 | 127 |
|
@@ -182,20 +185,18 @@ <h3>Password Recovery</h3> |
182 | 185 | </section> |
183 | 186 | </main> |
184 | 187 |
|
185 | | - <div class="position:fixed!important bottom:15px right:15px"> |
186 | | - <div |
187 | | - template="validate, signIn, forgotPassword" |
| 188 | + <!-- notification card (aria-live) --> |
| 189 | + <div class="position:fixed!important bottom:15px right:15px" aria-live="polite" role="status" aria-atomic="true"> |
| 190 | + <div template="validate, signIn, forgotPassword" |
188 | 191 | class="card position:relative margin-top:10px padding:20px {{status}}"> |
189 | 192 | <span class="{{type}} font-weight:400">{{message}}</span> |
190 | | - <!-- <a |
191 | | - onload-action="click" |
192 | | - actions="timeout(3000), action($next)"></a> --> |
193 | | - <a actions="remove" class="position:absolute top:4px right:4px"> |
194 | | - <i src="../assets/svg/times.svg"></i> |
| 193 | + <a actions="remove" class="position:absolute top:4px right:4px" aria-label="Dismiss notification"> |
| 194 | + <i src="../assets/svg/times.svg" aria-hidden="true"></i> |
195 | 195 | </a> |
196 | 196 | </div> |
197 | 197 | </div> |
198 | 198 |
|
199 | 199 | <script src="../dist/CoCreate.js"></script> |
200 | 200 | </body> |
201 | 201 | </html> |
| 202 | +</html> |
0 commit comments