Open zcorpan opened 4 years ago
In Firefox I observe four states with :checked
and :indeterminate
, which the specification supports, but Safari does not.
As for the text, I think obscuring the selection matches how it's exposed to ARIA. Doesn't seem to care only about visual appearance to me.
I guess you're right that it's not saying it's visual-only. I think it can be improved, though.
For context, I wanted to mention that HTML can represent an aria-checked="mixed"
checkbox in aria-practices, but found it difficult to write something that was a correct statement from the above-quoted text.
I think to resolve this issue we could say that
indeterminate
IDL attribute to true makes the checkbox "indeterminate" (exported dfn)That there is an interop difference between Firefox and Safari with the pseudo-classes is interesting. Do you have a demo?
<style>input + div { border:1em solid blue } input:checked + div { border-color:yellow }</style>
<input type=checkbox checked><div></div>
<input type=checkbox checked><div></div>
<script>document.querySelector("input").indeterminate = true</script>
not sure if this is the right thread to resurrect for this, but i'm wondering if there's any mileage in allowing indeterminate to be set using an actual attribute in HTML? i.e. being able to (statically) set an checkbox to be <input type="checkbox" indeterminate>
, to match the same way this can be done but only for assistive technologies with <input type="checkbox" aria-checked="mixed">
? again, it feels odd that it's possible to express this semantic concept in markup, but only for AT.
@patrickhlauke please file a new issue on that? I'd be supportive of adding that, but it might require some compatibility analysis. And maybe we can track someone down from the old Internet Explorer team who knows why it was done this way.
https://html.spec.whatwg.org/multipage/input.html#checkbox-state-(type=checkbox)
This text has been unchanged since its introduction in c1880dfa43239abefbc76ac716f9dfc5bb561cd6.
The
indeterminate
state is mapped toaria-checked="mixed"
in html-aam, so it's not just about visual rendering. https://w3c.github.io/html-aam/#el-input-checkboxIt also changes when the
:indeterminate
pseudo-class matches.I get that the
checked
state is a boolean and that it is left as-is whenindeterminate
is set to true, but I still find the downplay ofindeterminate
confusing and I don't understand what it is trying to accomplish. If it means that it doesn't change what is submitted, then we should say so directly.Can indeterminate be treated as a first-class concept?