fix(a11y): the on/off switches on Skills, Functions and Automations rows are named and no longer wrapped in an unnamed button (#33096)

This commit is contained in:
G30 authored and GitHub committed 2026-10-25 04:49:50 +09:00
1 parent 12585a3851
commit db5090dee3
3 files changed
+12 -9

No files matched your search

+4 -3
View File
@@ -704,9 +704,9 @@
</button>
</FunctionMenu>
<button
<div
class="flex h-6 items-center"
type="button"
role="presentation"
on:click={(e) => {
e.stopPropagation();
e.preventDefault();
@@ -715,6 +715,7 @@
<Tooltip content={func.is_active ? $i18n.t('Enabled') : $i18n.t('Disabled')}>
<Switch
bind:state={func.is_active}
ariaLabel={$i18n.t('Enabled')}
on:change={async () => {
toggleFunctionById(localStorage.token, func.id);
models.set(
@@ -729,7 +730,7 @@
}}
/>
</Tooltip>
</button>
</div>
{/if}
</div>
</div>
+4 -3
View File
@@ -643,9 +643,9 @@
</button>
</SkillMenu>
<button
<div
class="flex h-6 items-center"
type="button"
role="presentation"
on:click={(e) => {
e.stopPropagation();
e.preventDefault();
@@ -656,13 +656,14 @@
>
<Switch
bind:state={skill.is_active}
ariaLabel={$i18n.t('Enabled')}
on:change={async () => {
await toggleSkillById(localStorage.token, skill.id);
_skills.set(await getSkills(localStorage.token));
}}
/>
</Tooltip>
</button>
</div>
</div>
{/if}
</div>
+4 -3
View File
@@ -653,9 +653,9 @@
</button>
</AutomationMenu>
<button
<div
class="flex h-6 items-center"
type="button"
role="presentation"
on:click={(e) => {
e.stopPropagation();
e.preventDefault();
@@ -666,12 +666,13 @@
>
<Switch
bind:state={automation.is_active}
ariaLabel={$i18n.t('Enabled')}
on:change={() => {
toggleHandler(automation);
}}
/>
</Tooltip>
</button>
</div>
</div>
{/if}
</div>