Skip to content

Commit a1c6329

Browse files
committed
fix(material/sidenav): fix tabindex issue on side mode
remove tabindex=-1 from mat-drawer when in mode="side" so mobile screen readers like TalkBack does not focus on the container fixes b/286459024
1 parent e4a1f54 commit a1c6329

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/sidenav/drawer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class MatDrawerContent extends CdkScrollable implements AfterContentInit
165165
// this was also done by the animations module which some internal tests seem to depend on.
166166
// Simulate it by toggling the `hidden` attribute instead.
167167
'[style.visibility]': '(!_container && !opened) ? "hidden" : null',
168-
'tabIndex': '-1',
168+
'[attr.tabindex]': 'mode === "side" ? null : "-1"',
169169
},
170170
changeDetection: ChangeDetectionStrategy.OnPush,
171171
encapsulation: ViewEncapsulation.None,

0 commit comments

Comments
 (0)