Skip to content

Commit ccd7b34

Browse files
committed
fix: a11y warning of "02-advanced-svelte/04-actions/01-actions/app-a(b)"
1 parent c1e1157 commit ccd7b34

File tree

2 files changed

+6
-2
lines changed
  • content/tutorial/02-advanced-svelte/04-actions/01-actions

2 files changed

+6
-2
lines changed

content/tutorial/02-advanced-svelte/04-actions/01-actions/app-a/src/lib/App.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
{#if showMenu}
1515
<div
1616
class="modal-background"
17+
role="menu"
18+
tabindex="-1"
1719
on:click|self={() => showMenu = false}
1820
on:keydown={(e) => {
1921
if (e.key === 'Escape') showMenu = false;
@@ -124,4 +126,4 @@
124126
.menu input {
125127
flex: 1;
126128
}
127-
</style>
129+
</style>

content/tutorial/02-advanced-svelte/04-actions/01-actions/app-b/src/lib/App.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
{#if showMenu}
1616
<div
1717
class="modal-background"
18+
role="menu"
19+
tabindex="-1"
1820
on:click|self={() => showMenu = false}
1921
on:keydown={(e) => {
2022
if (e.key === 'Escape') showMenu = false;
@@ -125,4 +127,4 @@
125127
.menu input {
126128
flex: 1;
127129
}
128-
</style>
130+
</style>

0 commit comments

Comments
 (0)