mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-29 06:32:52 +00:00
fix(a11y): Playground's System Instructions button and model selects have names, and the role button's name starts with the word it shows (#33115)
This commit is contained in:
parent
90985382fc
commit
4ee756f9da
2 changed files with 13 additions and 5 deletions
|
|
@ -357,7 +357,12 @@
|
|||
{/if}
|
||||
|
||||
<div class="shrink-0">
|
||||
<button class="p-1.5 bg-transparent hover:bg-white/5 transition rounded-lg">
|
||||
<button
|
||||
type="button"
|
||||
class="p-1.5 bg-transparent hover:bg-white/5 transition rounded-lg"
|
||||
aria-label={$i18n.t('System Instructions')}
|
||||
aria-expanded={showSystem}
|
||||
>
|
||||
{#if showSystem}
|
||||
<ChevronUp className="size-3.5" />
|
||||
{:else}
|
||||
|
|
@ -474,10 +479,6 @@
|
|||
false)
|
||||
? ''
|
||||
: 'outline-hidden'}"
|
||||
aria-pressed={role === 'assistant'}
|
||||
aria-label={role === 'user'
|
||||
? $i18n.t('Switch to Assistant role')
|
||||
: $i18n.t('Switch to User role')}
|
||||
on:click={() => {
|
||||
role = role === 'user' ? 'assistant' : 'user';
|
||||
}}
|
||||
|
|
@ -487,6 +488,11 @@
|
|||
{:else}
|
||||
{$i18n.t('Assistant')}
|
||||
{/if}
|
||||
<span class="sr-only"
|
||||
>{role === 'user'
|
||||
? $i18n.t('Switch to Assistant role')
|
||||
: $i18n.t('Switch to User role')}</span
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
@ -494,6 +500,7 @@
|
|||
<div class="flex-1">
|
||||
<select
|
||||
class=" bg-transparent border border-gray-100/30 dark:border-gray-850/30 rounded-lg py-1 px-2 -mx-0.5 text-sm outline-hidden w-full"
|
||||
aria-label={$i18n.t('Model')}
|
||||
bind:value={selectedModelId}
|
||||
>
|
||||
{#each $models as model}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@
|
|||
<div class="flex-1">
|
||||
<select
|
||||
class="bg-transparent border border-gray-100/30 dark:border-gray-850/30 rounded-lg py-1 px-2 -mx-0.5 text-sm outline-hidden w-full"
|
||||
aria-label={$i18n.t('Model')}
|
||||
bind:value={selectedModelId}
|
||||
>
|
||||
{#each $models as model}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue