fix(a11y): tool entries in the Tools window open with the keyboard (#33166)

This commit is contained in:
G30 2026-10-25 03:45:03 -04:00 • committed by GitHub
parent 1bb76d7950
commit eccedc6a37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -106,8 +106,9 @@
onChange={(open: boolean) => {
if (open && isMcp && !needsAuth && !state) loadSpecs(tool);
}}
let:open
>
<div class="min-w-0 flex-1">
<button type="button" class="min-w-0 flex-1 text-left" aria-expanded={open}>
<div class="flex items-center gap-2 min-w-0">
<div class="text-sm font-normal dark:text-gray-100 text-gray-800 truncate">
{resolveLocalizedResource(tool, $i18n.language)}
@ -138,7 +139,7 @@
{resolveLocalizedResource(tool, $i18n.language, 'description')}
</div>
{/if}
</div>
</button>
<div slot="content" class="px-2 pb-2 text-xs text-gray-500 dark:text-gray-400">
{#if needsAuth}
<button
@ -200,8 +201,8 @@
</div>
<div class=" text-sm dark:text-gray-300 mb-1">
{#each selectedToolServers as toolServer}
<Collapsible buttonClassName="w-full" chevron>
<div>
<Collapsible buttonClassName="w-full" chevron let:open>
<button type="button" class="text-left" aria-expanded={open}>
<div class="text-sm font-normal dark:text-gray-100 text-gray-800">
{toolServer?.openapi?.info?.title} - v{toolServer?.openapi?.info?.version}
</div>
@ -213,7 +214,7 @@
<div class="text-xs text-gray-500">
{toolServer?.url}
</div>
</div>
</button>
<div
slot="content"

View file

@ -131,7 +131,7 @@
>
<div>
<div class="flex items-start justify-between">
<slot />
<slot {open} />
{#if chevron}
<div class="flex self-start translate-y-1">