Closed jnurthen closed 4 years ago
For use cases, mixed checkboxes/toggled states immediately come to mind for this e.g. Imagine category hierarchies where you check a box and it in-turn checks all of its children, but you’re allowed to go in and uncheck any of the children. Then it needs to be unchecked/unpressed, partially checked/mixed pressed, or checked/pressed. This idiom is used a lot in installers, which is where it immediately pops out at me from, but I could imagine faceted and advanced search interfaces, especially for catalogs and archiving systems using this quite a bit if there was support.
Has anyone ever used this - are there any use cases?
I know many cases of aria-checked=mixed for checkboxes, but not a single aria-pressed=mixed for buttons
not against the state, but also can't think of a situation where i'd think to use mixed toggle buttons and not checkboxes. Even with the situations Sina gave, I'd expect checkboxes over pressed/unpressed buttons.
edit: i was wrong about this bit, removed.
In case it's interesting, I ran a search for aria-pressed="mixed"
on almost 9000 web site home pages, and did not find a single instance.
Found 9 websites using it at https://publicwww.com/websites/%22aria-pressed%3D%5C%22mixed%5C%22%22/
And 4 at https://www.nerdydata.com/reports/aria-pressed-mixed/c249cf18-a27a-4cc6-a2d8-d78b29bb344f (some may be the same as above)
Wow - your searches are much faster than mine. 😄 Did you look at the actual uses?
In the last one 2 are a play/pause button for slick grid and 2 are a hamburger menu (on the same site so there are really only 3 uses) Neither are valid.
IIRC the history of this one was that we were originally mapping the capabilities of MSAA, which could handle it, and I think one use case came up somewhere, so we did it :/
Thanks @aleventhal that is very helpful. I think the safest thing to do is remove the reference to authoring practices and call it good. I'll do that. We can look again in 1.3 if anyone cares to do so.
aria-pressed states: "A value of mixed means that the values of more than one item controlled by the button do not all share the same value. Examples of mixed-state buttons are described in the WAI-ARIA Authoring Practices. "