fix(a11y): drawers keep keyboard focus inside and are announced as dialogs (#33547)

This commit is contained in:
G30 authored and GitHub committed 2026-11-01 17:49:45 +09:00
1 parent 3cda94d403
commit 1dd3793d4e
10 files changed
+77 -39

No files matched your search

+2 -1
View File
@@ -1512,6 +1512,7 @@ ${content}
<div class="flex min-h-0 flex-1">
<NotePanel
bind:show={showNoteTabs}
ariaLabel={$i18n.t('Pages')}
side="left"
panelWidth={280}
minWidth={180}
@@ -1659,7 +1660,7 @@ ${content}
</div>
{/if}
</div>
<NotePanel bind:show={showNoteChat} onClose={closeNotePanel}>
<NotePanel bind:show={showNoteChat} ariaLabel={$i18n.t('Chat')} onClose={closeNotePanel}>
<div class="flex items-center justify-between px-2 pt-2 pb-1 shrink-0">
<div class="flex gap-1 min-w-0 overflow-x-auto scrollbar-hidden">
{#each commentsEnabled ? ['Chat', 'Comments'] : ['Chat'] as tab}
@@ -13,6 +13,7 @@
export let storageKey = '';
export let floating = false;
export let onClose: () => void = () => {};
export let ariaLabel: string | undefined = undefined;
let mediaQuery: MediaQueryList;
let largeScreen = false;
@@ -36,6 +37,7 @@
{#if show}
<Drawer
{show}
{ariaLabel}
onClose={() => {
show = false;
onClose();