-
Notifications
You must be signed in to change notification settings - Fork 3
Navigation Accessibility #1726
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
Navigation Accessibility #1726
Conversation
| height: "60px", | ||
| paddingTop: theme.custom.dimensions.headerHeightSm, |
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.
The nav menu had extra top padding at mobile widths... I think the height: 60px was supposed to be paddingTop: 60px all along. Changed to theme constants.
gumaerc
left a comment
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.
There's an issue with the drawer on mobile:
| <UserView /> | ||
| </StyledToolbar> | ||
| </Bar> | ||
| <ClickAwayListener |
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.
Removing the ClickAwayListener here broke the drawer on mobile:
Screen.Recording.2024-10-23.at.11.08.51.AM.mov
I realize we created a close button in the drawer, but IMO clicking the menu button again should still close the drawer.
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.
Good catch. Should be resolved now.
Apparently ClickAwayListener attaches listeners to detect both click (mouse or touch) away and touchend (touch only).
Disabling the touch-only events fixes the issue, sort of. Click events also fire on touchscreens, but apparently
- mousedown -> move lots -> mouse up = click event
- touchstart -> move lots -> touchend NOT trigger a click. (Movement must be fairly small.)
So maybe disabling the touch-only trigger would feel weird, so went with a different solution.
gumaerc
left a comment
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.
The latest changes work well on my Android phone (Samsung Galaxy S22) and on iOS, but still exhibit the "open close open" or "close open close" behavior in the Firefox mobile simulator. I'm okay with approving it because it's just the mobile simulator in FF that doesn't work, and it's possible that it's just a bug with the FF simulator itself and the way it simulates touch events. Otherwise this all works fine.
|
@gumaerc Tested this a lot more on my iphone this morning and various emulators on my mac. It seems to be working well. Very occasionally my iphone iOS safari seems to drop a click event when spamming taps very fast. This has been (a) rare, and (b) only under very spammy conditions, so I'm going to accept it for now. |
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/5828
Description (What does it do?)
Makes navigation menu keyboard openable / closeable
Screenshots (if appropriate):
The close button moved:

How can this be tested?