mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
Merge pull request #16176 from itk-dev/feature/toggle-user-assistant-button-accessibility
FEAT: toggle user assistant button accessibility
This commit is contained in:
@@ -298,7 +298,15 @@
|
|||||||
>
|
>
|
||||||
<div class="flex-1 shrink-0">
|
<div class="flex-1 shrink-0">
|
||||||
<button
|
<button
|
||||||
class="px-3.5 py-1.5 text-sm font-medium bg-gray-50 hover:bg-gray-100 text-gray-900 dark:bg-gray-850 dark:hover:bg-gray-800 dark:text-gray-200 transition rounded-lg shrink-0"
|
type="button"
|
||||||
|
class="px-3.5 py-1.5 text-sm font-medium bg-gray-50 hover:bg-gray-100 text-gray-900 dark:bg-gray-850 dark:hover:bg-gray-800 dark:text-gray-200 transition rounded-lg shrink-0 {($settings?.highContrastMode ??
|
||||||
|
false)
|
||||||
|
? ''
|
||||||
|
: 'outline-hidden'}"
|
||||||
|
aria-pressed={role === 'assistant'}
|
||||||
|
aria-label={$i18n.t(
|
||||||
|
role === 'user' ? 'Switch to Assistant role' : 'Switch to User role'
|
||||||
|
)}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
role = role === 'user' ? 'assistant' : 'user';
|
role = role === 'user' ? 'assistant' : 'user';
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user