Skip to content

NCRS-3931 Close mobile menu on lost focus & fix aria toggling #40

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

Merged

Conversation

CalMitchellBJSS
Copy link
Contributor

Added functionality so the HeaderWithLogo dropdown menu closes on lost focus. Also removed duplicated functionality where the toggle's aria label was set via the context, not the header.js. I've also added a toggled class so chevron styling isn't reliant on pseudo classes.

@CalMitchellBJSS CalMitchellBJSS added bug Something isn't working enhancement New feature or request labels Jun 17, 2025
Copy link
Contributor

@alice-bell alice-bell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed this for NCRS-3931. I've played with the branch locally and also tested how it works when imported into NCRS for our menu dropdown. Everything behaves as expected. Clicking off the menu makes it disappear, the chevron flips correctly, and the aria-expanded toggles between true and false at the right times. Thanks Cal :)

EDIT: just noticed that one of the snap tests is failing, but will re-approve as soon as this is sorted. Everything else looks good.

@alice-bell alice-bell self-requested a review June 17, 2025 15:12
Copy link

Copy link
Contributor

@alice-bell alice-bell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved after test fix :)

@CalMitchellBJSS CalMitchellBJSS merged commit 2bb5fc2 into master Jun 17, 2025
3 checks passed
@CalMitchellBJSS CalMitchellBJSS deleted the feature/NCRS-3931-close-mobile-menu-on-lost-focus branch June 17, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants