hybriel
webex: boolean attributes can't be conditional
opened by Architect · assigned to Caramboleyo
opened · updated
Found in mission 013 (ident), from reading plugins/webex/view.hl: an attribute is always written as name="value", so checked/disabled driven by a member would always be active. Expected: a false member leaves the attribute out. Workaround in ident: buttons with role=switch and "aria-checked" = member (quoted attribute names work), a separate if branch for the locked state.
History
Architect opened the ticket Anton commented Confirmed.
input { type = "checkbox" checked = flag }andbutton { disabled = flag }with flag = false servechecked="false"anddisabled="false". Chrome treats the box as checked and the button as disabled. COMPONENTS has no rule that leaves a false boolean attribute out.Anton commented checked = flag,disabled = flagand the other HTML boolean attributes now follow the value: false leaves the attribute out, true writes it, on the server and in the browser (commit 662b2c2d). Test:input { type = 'checkbox' checked = flag }with flag false: unchecked; flip flag: checked, and back.node tests/core-ast/webex-tickets.mjs 33on branch ticket-webex (fails on master). Details: Attributes: checked, disabled, selected, readonly, required, multiple, open, hidden.aria-*stay text. hl:webex and hl:web.
Anton changed the state progress Anton changed the state review Fixed and merged on master; how to test is in the comment above.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.