Skip to content

🎨 Palette: Add skip to main content link for better keyboard accessibility - #118

Open
ELO2026X wants to merge 1 commit into
mainfrom
palette-skip-link-13516408964087902137
Open

ELO2026X wants to merge 1 commit into
mainfrom
palette-skip-link-13516408964087902137

Conversation

@ELO2026X

@ELO2026X ELO2026X commented Jul 2, 2026

Copy link
Copy Markdown
Owner

💡 What

Added a "Skip to main content" link to the application layout that is visually hidden but appears when navigated to via keyboard. Updated the main content area to be a semantic <main> tag that correctly handles receiving focus.

🎯 Why

Keyboard-only users and those using screen readers often have to navigate through the same repetitive navigation links (like the sidebar) on every page interaction. A "skip link" provides a crucial shortcut to jump directly to the primary content of the application.

📸 Before/After

Before: Keyboard users must tab through the entire sidebar to reach the main content.
After: The first tab press from the top of the document reveals a "Skip to main content" button. Pressing enter instantly focuses the main content area.

(A Playwright verification script was run to visually verify the link appears on focus, and that activating it successfully focuses the main content area.)

♿ Accessibility

  • Added a href="#main-content" link that is hidden visually using standard tailwind utilities (sr-only) but visible on focus (focus-visible:not-sr-only).
  • Converted the primary content <div> in ContentView.tsx to a semantic <main> element.
  • Added id="main-content" to act as the target for the skip link.
  • Added tabIndex={-1} and focus:outline-none to the <main> element. This ensures the container can receive programmatic focus when the skip link is clicked, allowing subsequent keyboard navigation to flow naturally from that point, while preventing an ugly focus ring from appearing around the entire content block.

PR created automatically by Jules for task 13516408964087902137 started by @ELO2026X

- Added a hidden 'Skip to main content' link in App.tsx that becomes visible on keyboard focus.
- Modified ContentView.tsx to use a semantic <main> tag with an id and proper focus handling (tabIndex=-1 and focus:outline-none) to support programmatic focus.

Co-authored-by: ELO2026X <153048533+ELO2026X@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

1 participant