mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-29 06:32:52 +00:00
fix(a11y): tool entries in the Tools window open with the keyboard (#33166)
This commit is contained in:
parent
1bb76d7950
commit
eccedc6a37
2 changed files with 7 additions and 6 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue