Skip to content

Commit e7a2ff3

Browse files
committed
auto-focus first playlist element
1 parent c545db6 commit e7a2ff3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/demo-app/a11y/sidenav/dual-sidenav-a11y.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ <h1 class="a11y-demo-sidenav-app-name">Dual Sidenav App</h1>
2626
</button>
2727
</mat-sidenav-content>
2828

29-
<mat-sidenav #endSnav mode="side" position="end" class="a11y-demo-sidenav-playlist" role="region">
29+
<mat-sidenav #endSnav mode="side" position="end" class="a11y-demo-sidenav-playlist" role="region"
30+
(open)="playlist1.focus()">
3031
<h2 class="a11y-demo-sidenav-playlist-header">Playlists</h2>
31-
<button mat-button aria-label="Thumbs up playlist" (click)="play('Thumbs up')">
32+
<button #playlist1 mat-button aria-label="Thumbs up playlist" (click)="play('Thumbs up')">
3233
Thumbs up
3334
</button>
3435
<button mat-button aria-label="Last added playlist" (click)="play('Last added')">
3536
Last added
3637
</button>
37-
<button mat-button aria-label="Free and purchased playlist" (click)="play('Free and purchased')">
38+
<button mat-button aria-label="Free and purchased playlist"
39+
(click)="play('Free and purchased')">
3840
Free and purchased
3941
</button>
4042
</mat-sidenav>

0 commit comments

Comments
 (0)