Skip to content

Commit d533d3b

Browse files
jelbournandrewseguin
authored andcommitted
Add aria-modal where appropriate (#11684)
* fix(dialog): add `aria-modal="true"` The `aria-modal` attribute was added in ARIA 1.1 * fix(bottom-sheet): add `aria-modal="true"` The `aria-modal` attribute was added in ARIA 1.1
1 parent 77e602f commit d533d3b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/lib/bottom-sheet/bottom-sheet-container.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import {FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y';
5252
'class': 'mat-bottom-sheet-container',
5353
'tabindex': '-1',
5454
'role': 'dialog',
55+
'aria-modal': 'true',
5556
'[attr.aria-label]': 'bottomSheetConfig?.ariaLabel',
5657
'[@state]': '_animationState',
5758
'(@state.start)': '_onAnimationStart($event)',

src/lib/dialog/dialog-container.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export function throwMatDialogContentAlreadyAttachedError() {
5959
host: {
6060
'class': 'mat-dialog-container',
6161
'tabindex': '-1',
62+
'aria-modal': 'true',
6263
'[attr.id]': '_id',
6364
'[attr.role]': '_config.role',
6465
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',

0 commit comments

Comments
 (0)