-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FOOTER] At mobile menus change disclosure button elements from <h4> to <button> #4476
Conversation
|
Great job! Everything works as expected across Chrome, Firefox, and Edge. We did notice the focus border is hidden on both sides and the bottom when collapsed Is there a way we can get at least the top and bottom to appear while collapsed to avoid confusion on which button is being selected? Currently, it appears correctly when not collapsed It also looks like the first secondary link is pushed right up against the button. Could you add some space between them when in the smallest mobile view for a little bit of separation? Thank you for your contribution to USWDS! |
|
Both updates look great! Loving these gif examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this Mike!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution @mherchel ! This is a very helpful improvement to the accessibility of our footer.
On review, I discovered a couple items that need to be addressed prior to merge:
Issue 1 - aria-expanded attribute doesn't always accurately reflect current state
Items affected: footer__primary-link
Window width: < mobile-lg
Issue: When an expanded item is collapsed via the user opening a second item, the aria-expanded attribute on the now-collapsed item remains set to "true".
Expected: Collapsing an expanded item should update the aria-expanded attribute to false.
Issue 2 - Cursor displays with a pointer on non-clickable headers
Items affected: footer__primary-link
Window width: > mobile-lg
Issue: Cursor displays as a pointer despite being a non-actionable item.
Expected: Cursor should be set to auto on non-actionable items
Issue 3 - Inaccessible link items at transition width
Items affected: footer list--unstyled
Window width: 480px
Issue: The user cannot access secondary link list items at exactly 480px. The footer structure changes but the list items remain hidden with no mechanism for exposing the links.
Expected: The link list items should be accessible to the user at all window widths.
Thanks again for all your work on this. Please let me know if you have any questions.
|
Thanks for the review! I'll be able to get back into this next week at the earliest. Thanks again, |
|
Any update on this one? |
|
Not yet, although it's still on my |
|
Alrighty... Issue 1 - aria-expanded attribute doesn't always accurately reflect current stateGood catch on this! This was happening when another menu opened (which in turn closes the original menu item). This is fixed. To prevent this from happening again, and to make the code a bit more resilient, I refactored the CSS to style against the Issue 2 - Cursor displays with a pointer on non-clickable headersThis is actually a pre-existing issue (see https://designsystem.digital.gov/components/footer/#big-footer). However, this is a simple fix and I've taken care of it in this PR. Issue 3 - Inaccessible link items at transition widthI can't reproduce this one! I've tried both Chrome and FF. Can you still reproduce this? If so, can you give me more info on how to do so? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @mherchel! I apologize for my delayed response. Everything is looking great.
One request - can you update your branch with the latest updates from the develop branch? We merged some tweaks in PR #4551 related to Issue 3 and I wanted to make sure they are included.
Other than that, all looks good to me.
Apologies again for the delay. We appreciate your efforts!
|
Thanks!
Just updated my fork. Tests are still passing on my local so 🤞 |
|
@mherchel Thanks so much for the quick reply. All tests are passing on my end as well. @mejiaj and @thisisdano, passing it to you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, and even more for your patience! It's very much appreciated.
Overall it looks great, added some comments. In the past we've had a11y issues pop up for using aria-expanded without an aria-controls on the same element. Adding those IDs and then referencing them would help improve a11y.
Besides that this PR is in good shape.
|
Thanks! These changes are pretty straightforward. I'm kinda slammed this week, so it'll likely be next week when I get to them :) |
…f menu footer lists
|
This should be good to go! Let me know if there are any more changes requested! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mherchel just a small issue, otherwise LGTM!
|
All changes are complete. Please re-review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for making those changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Might be able to get rid of the !important tag by setting the $chevron-icon-defaults "color" to buttonText in the future





Resolves #4475.
Description
This PR fixes some accessibility issues in the big footer variation. At mobile widths the footer menus collapse into menus. However the menu disclosure button is actually a
<h4>element, which is not navigable by keyboard, and has a host of other accessibility issues (for example, aspaceorenterwon't always activate this.This PR fixes the issue by actually swapping out the
<h4>for a<button>at mobile widths (and vice-versa at larger widths).In addition to the JavaScript changes, I had to make some changes to the styling so that button styles don't leak through, and to the tests, so the tests dynamically query for the selector instead of storing it as a variable.
npm testand make sure the tests for the files you have changed have passed.