Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
Olivero theme
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Jul 2021 at 19:58 UTC
Updated:
31 Aug 2021 at 12:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mherchelComment #3
mherchelUpdated patch with tests to verify aria-expanded values.
Comment #4
gauravvvv commentedOn fresh page load, aria-expanded="false" added by patch #3.
Adding after-patch screenshot for reference.
Comment #5
imalabyaPatch #3 works good. Added a screen recording to show the toggle.
Comment #6
lauriiiAccording to Drupal coding standards, control structures should always use curly braces around them https://www.drupal.org/docs/develop/standards/javascript/javascript-codi...
Comment #7
mherchelUpdating patch. Per @lauriii, I'm setting this back to RTBC since this is a minor change.
Comment #8
mherchelForgot to transpile the JS in the last patch.
Comment #9
andrewmacpherson commentedPatch #8 looks good to me, confirming RTBC.
I love the test coverage here. (I've read it, but I haven't run it...)
Some nitpicks, but no more work needed...
For triage, I think it's unlikely that any issue involving dynamic ARIA states will ever warrant being demoted to minor.
Great work everyone, and nice bug-catch!
Comment #10
andrewmacpherson commentedHang on, I have a question.
I see that...
once()If the page is loaded with a narrow viewport, and then the user changes the CSS viewport width afterwards (e.g. by increasing window size, or reducing browser zoom level), will the search-wide button still have the
aria-expanded=falsecorrectly initialized?Comment #11
mherchelYes it will!
Attaching a video showing the behavior.
Comment #12
andrewmacpherson commentedThanks for the demo in #11, that's great.
Meanwhile, another little nitpick with the button. The accessible name is a bit poor:
aria-label="Toggle Search Form".There's no need for the word "Toggle" here, because...
aria-expandedattribute (whether true or false) is sufficient to convey the behaviour. A screen reader will say "button, collapsed" or "button, expanded" which conveys that it is expand/collapse-ible.<button aria-pressed="true|false">. Using "toggle" as part of the name for a disclosure button may be sending mixed message about how it behaves. I think we covered this already? Perhaps it was in an issue about the sub-navigation buttons.Let's improve it here, under the overall scope of WCAG "Name, role, value".
TODO: Remove the word "toggle" from the aria-label -
aria-label="Search Form". Then screen readers will typically say "Search Form, button, collapsed". A user will expect a search form to be revealed by pressing the button.The narrow-viewport main menu button also has an unnecessary "toggle" in the name. I'll file a separate issue about that now.
Comment #13
andrewmacpherson commentedForgot to update status for #12
Comment #14
mherchelI split out #12 into #3228145: Remove misleading "toggle" phrase from Olivero's wide search form disclosure button. I've had committers make me go back and split patches that have multiple fixes before.
Comment #15
andrewmacpherson commentedHmm, okay. I think WCAG Name, Role, Value was a pretty well contained scope here; not really scope creep.
Anywayhowsomedivver.... recap:
So back to RTBC.
Comment #17
lauriiiCommitted c96121d and pushed to 9.3.x. Thanks!