🎨 Palette: Add 'Skip to main content' link for keyboard accessibility - #105
🎨 Palette: Add 'Skip to main content' link for keyboard accessibility#105ELO2026X wants to merge 1 commit into
Conversation
- 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>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 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"> |
There was a problem hiding this comment.
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 👍 / 👎.
💡 What: Added a hidden 'Skip to main content' anchor link to
App.tsxthat targets a new<main id="main-content">element inContentView.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:
sr-only focus-visible:not-sr-onlyto remain hidden until it receives keyboard focus, avoiding visual clutter for sighted mouse users while remaining accessible.<main>container hastabIndex={-1}so it can receive programmatic focus without interfering with the natural tab sequence.focus:outline-noneto 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