feat(ngAria): announce ngMessages with aria-live

By including the `ngAria` module, `ngMessages` will automatically include the aria-live
attribute with an assertive voice, allowing validation messages to be spoken throuhg a
screenreader.

Closes #9834
This commit is contained in:
Marcy Sutton
2014-10-29 14:32:26 -07:00
committed by Caitlin Potter
parent 91834bcf37
commit 187e43185d
2 changed files with 21 additions and 0 deletions

View File

@@ -400,6 +400,16 @@ describe('$aria', function() {
});
});
describe('announcing ngMessages', function() {
beforeEach(injectScopeAndCompiler);
it('should attach aria-live', function() {
var element = [
$compile('<div ng-messages="myForm.myName.$error">')(scope)
];
expectAriaAttrOnEachElement(element, 'aria-live', "assertive");
});
});
describe('aria-value when disabled', function() {
beforeEach(configAriaProvider({