fix(a11y): screen readers hear how many models match a search in the model picker (#32897)

This commit is contained in:
G30 2026-10-22 13:41:45 -04:00 • committed by GitHub
parent 6b9237f1a1
commit 7b26b962ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1032,6 +1032,16 @@
</div>
{/if}
<div class="sr-only" aria-live="polite" aria-atomic="true">
{#if sanitizedSearchValue}
{filteredItems.length === 0
? $i18n.t('No results found')
: filteredItems.length === 1
? $i18n.t('1 item')
: $i18n.t('{{count}} items', { count: filteredItems.length })}
{/if}
</div>
<div class="group relative flex min-h-0 flex-1 flex-col">
{#if filteredItems.length === 0}
{#if items.length === 0 && $user?.role === 'admin'}