a11y: skip link + main landmark id (#6) - #9
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: Note
|
| Layer / File(s) | Summary |
|---|---|
Implement skip-to-content navigation parts/header.html, templates/index.html, style.css |
The header adds a link to #main-content. The main element receives the matching ID and tabindex="-1". Focused skip links become visible with prominent styling. |
Estimated code review effort: 1 (Trivial) | ~5 minutes
Sequence Diagram(s)
sequenceDiagram
participant KeyboardUser
participant Browser
participant Header
participant MainContent
KeyboardUser->>Browser: Tab to skip link
Browser->>Header: Render link targeting `#main-content`
KeyboardUser->>Browser: Activate skip link
Browser->>MainContent: Focus main element
Suggested reviewers: ashleyshaw
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly and concisely summarizes the main accessibility changes: adding a skip link and a main landmark ID. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@style.css`:
- Line 19: Update the shared .screen-reader-text rule to preserve the legacy
clip declaration for WordPress 6.4–6.7 while satisfying Stylelint: either
replace it with the appropriate clip-path handling only if compatibility is
retained, or add a narrowly scoped Stylelint exception documenting the
compatibility reason. Do not remove clip alone, since clip-path: none does not
reset the separate legacy clip value.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 375ead0b-4059-49a8-9112-154fb05e74a5
📒 Files selected for processing (3)
parts/header.htmlstyle.csstemplates/index.html
|
Thanks for the CodeRabbit note on Left the legacy |
Summary
Accessibility baseline partial for #6:
parts/header.htmlid="main-content"+ focus target on templatemainlandmarksstyle.cssNav block already renders a landmark; full named
aria-labelcan follow if you want it forced for everywp:navigationplacement.Test plan
Summary by CodeRabbit