fix(list): set aria-multiselectable on selection list (#13325)

The `mat-selection-list` is set up as a listbox, however we never set `aria-multiselectable`, which means that the element is assumed to be single selection. These changes add `aria-multiselectable="true"` since selection lists are always multi-selection.
This commit is contained in:
Kristiyan Kostadinov
2018-09-27 16:09:11 +02:00
committed by Jeremy Elbourn
parent b5001f62c5
commit 877ef5d738
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -431,6 +431,11 @@ describe('MatSelectionList without forms', () => {
expect(item.selected).toBe(true);
});
it('should set aria-multiselectable to true on the selection list element', () => {
expect(selectionList.nativeElement.getAttribute('aria-multiselectable')).toBe('true');
});
});
describe('with list option selected', () => {
+1
View File
@@ -264,6 +264,7 @@ export class MatListOption extends _MatListOptionMixinBase
'(focus)': 'focus()',
'(blur)': '_onTouched()',
'(keydown)': '_keydown($event)',
'aria-multiselectable': 'true',
'[attr.aria-disabled]': 'disabled.toString()',
},
template: '<ng-content></ng-content>',