Skip to content

🎨 Palette: Add 'Skip to main content' link for keyboard accessibility - #105

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

🎨 Palette: Add 'Skip to main content' link for keyboard accessibility#105
ELO2026X wants to merge 1 commit into
mainfrom
jules-palette-skip-link-9086805987808874544

Conversation

@ELO2026X

Copy link
Copy Markdown
Owner

💡 What: Added a hidden 'Skip to main content' anchor link to App.tsx that targets a new <main id="main-content"> element in ContentView.tsx.
🎯 Why: To improve keyboard navigation accessibility, allowing screen reader and keyboard-only users to bypass repetitive navigation links (like the Sidebar) and jump straight to the primary content area.
📸 Before/After: See the attached screenshots from Playwright verification showing the link becoming visible on focus.
Accessibility:

  • The link uses sr-only focus-visible:not-sr-only to remain hidden until it receives keyboard focus, avoiding visual clutter for sighted mouse users while remaining accessible.
  • The <main> container has tabIndex={-1} so it can receive programmatic focus without interfering with the natural tab sequence.
  • Added focus:outline-none to the <main> container to prevent an unsightly browser default focus ring from appearing around the entire main content area when the link is clicked.

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

- Added a hidden 'Skip to main content' anchor link to `App.tsx` that becomes visible on keyboard focus.
- Updated `ContentView.tsx` to use a `<main>` tag with `id="main-content"` and `tabIndex={-1}` to serve as the target.
- Enhances keyboard navigation accessibility by allowing users to bypass the sidebar menu.

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 chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94e6b89630

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


return (
<div className="flex-1 flex flex-col p-4">
<main id="main-content" tabIndex={-1} className="flex-1 flex flex-col p-4 focus:outline-none">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the skip target visibly focused

In the keyboard-only flow where a user tabs to the skip link and presses Enter, focus can land on this <main> target because it has tabIndex={-1}, but focus:outline-none removes the only focus indicator. Since the main pane is already visible beside the sidebar, the skip link disappears with no visual confirmation of where focus moved until the next Tab press, which undercuts the accessibility benefit for sighted keyboard users; keep or replace the outline with a visible focus style.

Useful? React with 👍 / 👎.

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