Skip to content

Commit 4b5161c

Browse files
committed
refactor(material/sidenav): updates syntax
Updates previous fix to use proper syntax to calculate which mode that the sidenav is set to.
1 parent c6ec332 commit 4b5161c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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': '(mode !== "side") ? "-1" : null',
168+
'[attr.tabIndex]': '(mode !== "side") ? "-1" : null',
169169
},
170170
changeDetection: ChangeDetectionStrategy.OnPush,
171171
encapsulation: ViewEncapsulation.None,

src/material/sidenav/sidenav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class MatSidenavContent extends MatDrawerContent {}
4747
templateUrl: 'drawer.html',
4848
host: {
4949
'class': 'mat-drawer mat-sidenav',
50-
'tabIndex': '-1',
50+
'[attr.tabIndex]': '(mode !== "side") ? "-1" : null',
5151
// must prevent the browser from aligning text based on value
5252
'[attr.align]': 'null',
5353
'[class.mat-drawer-end]': 'position === "end"',

0 commit comments

Comments
 (0)