mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-29 05:15:38 +08:00
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:
committed by
Caitlin Potter
parent
91834bcf37
commit
187e43185d
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user