Merge pull request #16176 from itk-dev/feature/toggle-user-assistant-button-accessibility

FEAT: toggle user assistant button accessibility
This commit is contained in:
Tim Jaeryang Baek 2025-07-31 15:26:41 +04:00 committed by GitHub
commit 22f9481e99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -298,7 +298,15 @@
>
<div class="flex-1 shrink-0">
<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={() => {
role = role === 'user' ? 'assistant' : 'user';
}}