fix(a11y): the note editor's Undo, Redo, Record and Note Menu buttons have names, and Tab reaches both menus (#33113)

This commit is contained in:
G30 2026-10-24 23:17:20 -04:00 • committed by GitHub
parent 4ee756f9da
commit befd1dcca8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View file

@ -1134,6 +1134,7 @@ ${content}
<div class="flex items-center gap-0.5 self-center min-w-fit" dir="ltr">
<button
class="self-center p-1 hover:enabled:bg-black/5 dark:hover:enabled:bg-white/5 dark:hover:enabled:text-white hover:enabled:text-black rounded-md transition disabled:cursor-not-allowed disabled:text-gray-500 disabled:hover:text-gray-500"
aria-label={$i18n.t('Undo')}
on:click={() => {
editor.chain().focus().undo().run();
// versionNavigateHandler('prev');
@ -1145,6 +1146,7 @@ ${content}
<button
class="self-center p-1 hover:enabled:bg-black/5 dark:hover:enabled:bg-white/5 dark:hover:enabled:text-white hover:enabled:text-black rounded-md transition disabled:cursor-not-allowed disabled:text-gray-500 disabled:hover:text-gray-500"
aria-label={$i18n.t('Redo')}
on:click={() => {
editor.chain().focus().redo().run();
// versionNavigateHandler('next');
@ -1218,9 +1220,13 @@ ${content}
}}
>
<Tooltip content={$i18n.t('Record')} placement="top">
<div class="p-1 bg-transparent hover:bg-white/5 transition rounded-lg">
<button
type="button"
class="p-1 bg-transparent hover:bg-white/5 transition rounded-lg"
aria-label={$i18n.t('Record')}
>
<Mic className="size-4" />
</div>
</button>
</Tooltip>
</RecordMenu>
{/if}
@ -1266,9 +1272,13 @@ ${content}
pinnedNotes.set(await getPinnedNoteList(localStorage.token).catch(() => []));
}}
>
<div class="p-1 bg-transparent hover:bg-white/5 transition rounded-lg">
<button
type="button"
class="p-1 bg-transparent hover:bg-white/5 transition rounded-lg"
aria-label={$i18n.t('Note Menu')}
>
<EllipsisHorizontal className="size-5" />
</div>
</button>
</NoteMenu>
{#if note?.write_access}

View file

@ -2158,6 +2158,7 @@
"Recover your authenticator": "",
"Recovery code": "",
"Redirecting you to Open WebUI Community": "",
"Redo": "",
"Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative.": "",
"Reference Chats": "",
"Refresh": "",