fix(a11y): three buttons' names include the text they show (#33593)

This commit is contained in:
G30 2026-11-02 17:52:39 -05:00 • committed by GitHub
parent 2176bb7bd2
commit f773e057e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View file

@ -657,7 +657,6 @@
type="button"
class="flex min-w-0 max-w-full items-center gap-1.5 py-1 text-left hover:text-gray-900 dark:hover:text-gray-100"
style:opacity={selectedModel && selectedModel !== id ? 0.45 : 1}
aria-label={`${name(id)} — ${$i18n.t('Select to isolate model')}`}
aria-pressed={selectedModel === id}
on:click={() => isolate(id)}
>
@ -669,6 +668,7 @@
$i18n.language
)}>{number(hovered ? (hoveredModels?.[id] ?? 0) : (totals[id] ?? 0))}</span
>
<span class="sr-only">{$i18n.t('Select to isolate model')}</span>
</button>
{/each}
</div>

View file

@ -403,12 +403,12 @@
<td class="px-3 py-1 min-w-[5rem] w-20">
<button
class="text-xs font-normal leading-4 capitalize transition {roleClass(user.role)}"
aria-label={$i18n.t('Change User Role')}
on:click={() => {
selectedUser = user;
showEditUserModal = !showEditUserModal;
}}
>
<span class="sr-only">{$i18n.t('Change User Role')}</span>
{$i18n.t(user.role)}
</button>
</td>

View file

@ -1421,13 +1421,12 @@ ${content}
<div class="min-w-0 max-w-40 pl-2 pr-1">
<button
class="flex max-w-full items-center gap-1 bg-transparent text-xs text-gray-500 hover:text-gray-900 dark:hover:text-gray-100 transition"
aria-label={$i18n.t('Toggle pages')}
aria-expanded={showNoteTabs}
aria-controls="note-tabs-panel"
on:click={() => {
showNoteTabs = !showNoteTabs;
}}
><span class="truncate"
><span class="sr-only">{$i18n.t('Toggle pages')}</span><span class="truncate"
>{activePage?.id === 'main' && activePage.inherit_note_title !== false
? note.title || $i18n.t('Untitled')
: activePage?.title}</span