- From: Patrick H. Lauke <redux@splintered.co.uk>
- Date: Sat, 6 Feb 2021 11:42:44 +0000
- To: w3c-wai-ig@w3.org
On 06/02/2021 11:30, Léonie Watson wrote: > If you want to keep both buttons then you can set aria-pressed="true" on > the button that is pressed, and automatically set aria-pressed="false" > on the other button. You do not need to use the disabled attribute. Adding to what Léonie said, I'd say that this approach would only make sense if the expand and collapse buttons are truly the only two different states of this accordion. However, I suspect that in this accordion a user can also go in an open/close individual accordion panels - at which point there's then a mismatch between what the two buttons indicate (the accordion is fully expanded / the accordion is fully collapsed), which then becomes even more confusing (e.g. a user may have pressed the "expand all", it's now indicated as being "pressed", but the user went in and collapsed all the accordion panels manually...but according to the state conveyed by the two buttons, the accordion is nomally all expanded, since the "expand all" control still exposes that it's "pressed"). Long story short, I'd keep them as momentary action buttons that do not need to convey any kind of state. If you want to get fancy, you could also update their "disabled" property dynamically depending on the state of all the accordion panels - e.g. when the user presses "expand all", expand all panels and set the button to be disabled, since it now doesn't serve any more purpose. But if the user goes in an collapses even one of the panels, make the "expand all" button active/non-disabled again, because now activating the button would serve a purpose again. But honestly, that becomes rather ... fiddly. P -- Patrick H. Lauke https://www.splintered.co.uk/ | https://github.com/patrickhlauke https://flickr.com/photos/redux/ | https://www.deviantart.com/redux twitter: @patrick_h_lauke | skype: patrick_h_lauke
Received on Saturday, 6 February 2021 11:42:57 UTC