fix: add aria-pressed and aria-label to Web Search and Image Generation toggles (#25258)

This commit is contained in:
maco
2026-06-29 03:36:37 -05:00
committed by GitHub
parent 58f9170319
commit 8bc4ac2641
@@ -269,6 +269,8 @@
<Tooltip content={$i18n.t('Search the internet')} placement="top-start">
<button
class="flex w-full justify-between gap-2 items-center px-3 py-1.5 text-sm cursor-pointer rounded-xl hover:bg-gray-50 dark:hover:bg-gray-800/50"
aria-pressed={webSearchEnabled}
aria-label={webSearchEnabled ? $i18n.t('Disable Web Search') : $i18n.t('Enable Web Search')}
on:click={() => {
webSearchEnabled = !webSearchEnabled;
}}
@@ -300,6 +302,8 @@
<Tooltip content={$i18n.t('Generate an image')} placement="top-start">
<button
class="flex w-full justify-between gap-2 items-center px-3 py-1.5 text-sm cursor-pointer rounded-xl hover:bg-gray-50 dark:hover:bg-gray-800/50"
aria-pressed={imageGenerationEnabled}
aria-label={imageGenerationEnabled ? $i18n.t('Disable Image Generation') : $i18n.t('Enable Image Generation')}
on:click={() => {
imageGenerationEnabled = !imageGenerationEnabled;
}}