|
194 | 194 | assert(!input.focused, 'input is blurred'); |
195 | 195 | }); |
196 | 196 | }); |
197 | | - |
198 | | - suite('a11y', function() { |
199 | | - |
200 | | - test('has aria-labelledby', function() { |
201 | | - var input = fixture('label'); |
202 | | - assert.isTrue(input.inputElement.textarea.hasAttribute('aria-labelledby')) |
203 | | - assert.equal(input.inputElement.textarea.getAttribute('aria-labelledby'), Polymer.dom(input.root).querySelector('label').id, 'aria-labelledby points to the label'); |
204 | | - }); |
205 | | - |
206 | | - test('has aria-describedby for error message', function() { |
207 | | - var input = fixture('required'); |
208 | | - forceXIfStamp(input); |
209 | | - assert.isTrue(input.inputElement.textarea.hasAttribute('aria-describedby')); |
210 | | - assert.equal(input.inputElement.textarea.getAttribute('aria-describedby'), Polymer.dom(input.root).querySelector('paper-input-error').id, 'aria-describedby points to the error message'); |
211 | | - }); |
212 | | - |
213 | | - test('has aria-describedby for character counter', function() { |
214 | | - var input = fixture('char-counter'); |
215 | | - forceXIfStamp(input); |
216 | | - assert.isTrue(input.inputElement.textarea.hasAttribute('aria-describedby')); |
217 | | - assert.equal(input.inputElement.textarea.getAttribute('aria-describedby'), Polymer.dom(input.root).querySelector('paper-input-char-counter').id, 'aria-describedby points to the character counter'); |
218 | | - }); |
219 | | - |
220 | | - test('has aria-describedby for character counter and error', function() { |
221 | | - var input = fixture('required-char-counter'); |
222 | | - forceXIfStamp(input); |
223 | | - assert.isTrue(input.inputElement.textarea.hasAttribute('aria-describedby')); |
224 | | - assert.equal(input.inputElement.textarea.getAttribute('aria-describedby'), Polymer.dom(input.root).querySelector('paper-input-error').id + ' ' + Polymer.dom(input.root).querySelector('paper-input-char-counter').id, 'aria-describedby points to the error message and character counter'); |
225 | | - }); |
226 | | - |
227 | | - }); |
228 | | - |
229 | | - |
230 | 197 | </script> |
231 | 198 |
|
232 | 199 | </body> |
|
0 commit comments