Skip to content

Commit 0e1219c

Browse files
committed
fix(ui): keep checkbox capability rows switch-free
The unified capability toggle row embedded a wa-switch even in checkbox mode, reintroducing a hidden-but-real switch control inside the new-session composer (breaking the rail-owns-switches contract asserted by new-session-page.places e2e) and an aria-hidden focusable control. Checkbox rows rely on the dropdown item's own checked state.
1 parent 70a69db commit 0e1219c

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

‎ui/src/pages/chat/components/chat-composer-plus-menu.ts‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,17 @@ function renderCapabilityToggleRow(options: {
142142
<span>${options.label}</span>
143143
${options.note ?? nothing}
144144
</span>
145-
<wa-switch
146-
slot="details"
147-
class="agent-chat__capability-menu-switch"
148-
size="s"
149-
tabindex="-1"
150-
.checked=${options.checked}
151-
?disabled=${options.disabled}
152-
aria-label=${options.label}
153-
aria-hidden=${options.checkbox ? "true" : nothing}
154-
></wa-switch>
145+
${options.checkbox
146+
? nothing
147+
: html`<wa-switch
148+
slot="details"
149+
class="agent-chat__capability-menu-switch"
150+
size="s"
151+
tabindex="-1"
152+
.checked=${options.checked}
153+
?disabled=${options.disabled}
154+
aria-label=${options.label}
155+
></wa-switch>`}
155156
</wa-dropdown-item>
156157
`;
157158
}

0 commit comments

Comments
 (0)