Skip to content
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

fix(components): update mobile menu behaviour #4395

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

leagrdv
Copy link
Contributor

@leagrdv leagrdv commented Jan 7, 2025

No description provided.

@leagrdv leagrdv requested a review from a team as a code owner January 7, 2025 15:06
@leagrdv leagrdv requested review from gfellerph and removed request for a team January 7, 2025 15:06
Copy link

changeset-bot bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: 231fa8b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@swisspost/design-system-components Patch
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components-react Patch
@swisspost/design-system-documentation Patch
@swisspost/design-system-components-angular Patch
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles Patch
@swisspost/design-system-tokens Patch
@swisspost/design-system-intranet-header Patch
@swisspost/design-system-icons Patch
@swisspost/design-system-migrations Patch
@swisspost/design-system-styles-primeng Patch
@swisspost/internet-header Patch
@swisspost/design-system-intranet-header-workspace Patch
@swisspost/design-system-styles-primeng-workspace Patch
@swisspost/design-system-intranet-header-showcase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@leagrdv leagrdv changed the title chore(components): update mobile menu behaviour fix(components): update mobile menu behaviour Jan 7, 2025
@leagrdv leagrdv added the 🚂 PR train PR which follows another one. label Jan 7, 2025
@swisspost-bot
Copy link
Contributor

swisspost-bot commented Jan 7, 2025

Related Previews

if (e.key === 'Tab') {
if (e.shiftKey && document.activeElement === this.firstFocusableEl) {
// If back tab (Tab + Shift) and first element is focused, focus goes to the last element of the megadropdown
e.preventDefault();
Copy link
Member

Choose a reason for hiding this comment

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

This should only be done if the menu is open, otherwise it's impossible to go back to the logo and skiplinks:

image

Pressing [shift] + [tab] in this situation locks focus to the menu button.

Base automatically changed from 4326-update-megadropdown-styles to main January 22, 2025 14:32
@leagrdv leagrdv requested a review from a team as a code owner January 22, 2025 14:32
@leagrdv leagrdv linked an issue Jan 22, 2025 that may be closed by this pull request
3 tasks
@leagrdv leagrdv removed the 🚂 PR train PR which follows another one. label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update megadropdown mobile behavior
3 participants