- First commit to issue fork.
- Merge request !6821Use aria disclosure pattern in vertical toolbar submenu toggle buttons. β (Open) created by camilledavis
- Status changed to Needs review
over 1 year ago 8:03pm 28 February 2024 Made MR based on the following feedback from @maxstarkenburg in #accessibility Slack:
- Remove the ["Expand/Collapse" text] because it's redundant with information a screen reader would already announce via aria-expanded.
- Depending on who you ask, the button's accessible name (potentially via aria-labelledby) ought to be "[sibling link text]" or "[sibling link text] sub-menu" or "More [sibling link text]".
- Also, personally, I would recommend not letting the effort to add aria-controls block this issue (perhaps could be made into a separate issue?), since adding aria-expanded and removing the incorrect state would both be easier wins, adding value sooner. aria-controls seems to have limited AT support and/or be semi-"controversial" in its usefulness, see e.g. https://heydonworks.com/article/aria-controls-is-poop/ and https://github.com/w3c/aria/issues/995
- Status changed to Needs work
over 1 year ago 11:46pm 29 February 2024 - πΊπΈUnited States smustgrave
Know it's a task but possible to add a simple assertion that checks the aria value. So we can ensure we don't break this.
- πΊπΈUnited States chri5tia PDX
I re-rolled the patch from #4 to work with Drupal 10.4.x
- πΊπΈUnited States kentr Durango, CO
Adding Needs Tests based on #19, and related issue.
- πΊπΈUnited States benjifisher Boston area
I know nothing about ARIA recommendations, but on #3286466-50: Tabbing order does not satisfy 508 accessibility requirements β , @rkoller suggested using
aria-pressed
instead ofaria-expanded
:... But i wonder if
aria-expanded
is the right choice for a toggle button. I always have problem as a sighted user understanding the current state for toggle buttons that change their label inbetween states. A point that Leonie Watson also illustrated in their talk for smashing magazine: https://youtu.be/OUDV1gqs9GA?t=3222 . She advocated to usearia-pressed
instead. That way the button state is either pressed/selected or not and the button label remains the same between states. That way things are completely clear and unambiguous for screen reader users?Does that apply here? Should we consider it?
@andrewmacpherson: It has been more than 5 years since you self-assigned this issue and last commented. I am un-assigning it now.
- πΊπΈUnited States kentr Durango, CO
@benjfisher
...@rkoller suggested using aria-pressed instead of aria-expanded...
Does that apply here? Should we consider it?The place in the video that @rkoller linked is regarding a button that toggles light / dark mode.
aria-expanded
wouldn't apply to that, I believe, because in that use-case there's nothing to expand or show.Later in the video, there's an example of a show / hide toggle button with
aria-expanded
. The video creator appears to approve of that use.There's a separate question of whether to change the "label" (visual display) when the toggle is activated. I can't speak to that. I find changing icons for show / hide widgets (like the orientation of a caret) to be helpful.
- πΊπΈUnited States benjifisher Boston area
@kentr:
Thanks for the reply (here and on the related issue).
I will try to find time to add some tests coverage for this issue. From the comments, that is the only thing holding it back. (The Remaining tasks list "Update JS + templates". I think that is already done, although the current MR changes only one JS file, no templates. If I have that right, can someone that item?)