Skip to content

Fix/header/mobile/nav - #4

Merged
kamycoding merged 6 commits into
mainfrom
fix/header/mobile/nav
Aug 4, 2026
Merged

Fix/header/mobile/nav#4
kamycoding merged 6 commits into
mainfrom
fix/header/mobile/nav

Conversation

@kamycoding

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings August 4, 2026 11:57
@kamycoding
kamycoding merged commit dce106c into main Aug 4, 2026
1 check passed
@kamycoding
kamycoding deleted the fix/header/mobile/nav branch August 4, 2026 12:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Angular header’s mobile navigation to behave more like an accessible modal dialog (focus trapping + improved focus management), while also introducing new Home page hero markup and adding Angular CDK as a dependency.

Changes:

  • Add Angular CDK and use CdkTrapFocus to trap focus within the mobile navigation “dialog”.
  • Adjust mobile-menu close behavior and defer focus restoration until after render.
  • Add a new Home hero section and a new hero SVG asset.

Reviewed changes

Copilot reviewed 4 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/app/pages/home/home.html Adds new Home page hero section markup and social links.
src/app/layout/header/header.ts Imports CDK focus trap and defers focus restoration with afterNextRender.
src/app/layout/header/header.html Converts mobile menu into a dialog-like overlay with focus trapping and updated click handlers.
public/assets/hero/waving-hand.svg Adds a new hero SVG asset.
package.json Adds @angular/cdk dependency.
package-lock.json Updates lockfile to include CDK and related dependency resolution changes.
Suppressed comments (2)

src/app/layout/header/header.html:197

  • Mobile navigation links now call closeMobileMenu() with restoreFocus defaulting to true, which will force focus back to the hamburger button immediately after the user activates a section link. For in-menu navigation, focus restoration should be disabled to avoid disrupting scrolling/fragment navigation.
                (click)="closeMobileMenu()"

src/app/layout/header/header.html:253

  • Social links in the mobile menu now call closeMobileMenu() with restoreFocus defaulting to true. For link activation (especially opening a new tab), restoring focus to the hamburger in the original tab is unexpected and can be disorienting; keep restoreFocus disabled for link clicks.
          (click)="closeMobileMenu()"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

class="inline-flex focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-primary"
routerLink="/"
aria-label="Go to homepage"
(click)="closeMobileMenu()"
role="dialog"
aria-modal="true"
aria-label="Navigation menu"
class="fixed inset-x-0 top-0 z-60 h-164 max-h-[100dvh] w-full overflow-y-auto overscroll-contain bg-[url('/assets/backgrounds/mobile-menu-background.webp')] bg-no-repeat [background-size:100%_100%] transition-transform duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:duration-0 lg:hidden"
Comment on lines +1 to +5
<main>
<section
id="hero"
class="relative min-h-svh overflow-hidden bg-canvas px-4 text-foreground lg:px-18"
aria-labelledby="hero-title"
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.

2 participants