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 2026-10-24 15:49:50 -04:00 • committed by GitHub
parent 12585a3851
commit db5090dee3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 9 deletions

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>

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>

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>