Fix inaccurate accessible name on settings navigation landmark - #1822
Conversation
The settings page nav landmark was labeled "Settings Tabs" even though it contains navigation links rather than an ARIA tabs widget. This misleads assistive technology users about the nature of the control. Fixes #1756
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe settings page navigation landmark in ChangesAccessible name correction
Estimated code review effort: 1 (Trivial) | ~2 minutes Related issues: Suggested labels: accessibility, bug, good first issue Suggested reviewers: none 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the aria-label attribute of the settings navigation bar from 'Settings Tabs' to 'Settings' in partials/settings-page.php. The reviewer suggests wrapping this user-facing string in a WordPress translation function (esc_attr__()) to support internationalization.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| <?php | ||
| if ( $edac_settings_tab_items ) { | ||
| echo '<nav class="nav-tab-wrapper" aria-label="Settings Tabs">'; | ||
| echo '<nav class="nav-tab-wrapper" aria-label="Settings">'; |
There was a problem hiding this comment.
The aria-label value "Settings" is a user-facing string (read by screen readers) but is currently hardcoded in English. To support internationalization (i18n), it should be translatable using WordPress translation functions like esc_attr__().
echo '<nav class="nav-tab-wrapper" aria-label="' . esc_attr__( 'Settings', 'accessibility-checker' ) . '">';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 `@partials/settings-page.php`:
- Line 115: The landmark label in the settings navigation is hardcoded, so
localize the aria-label in the settings-page markup. Update the echo that
renders the nav-tab-wrapper in the settings page to use esc_attr__() with the
accessibility-checker text domain, keeping the same “Settings” label but making
it translatable and properly escaped.
🪄 Autofix (Beta)
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.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5c6e553b-f841-41f2-a77b-7234ba4bab19
📒 Files selected for processing (1)
partials/settings-page.php
Amber suggested this label on issue #1756 instead of the generic "Settings".
Wrap the aria-label in esc_attr__() with the accessibility-checker text domain instead of a hardcoded string.
Short description: The settings page nav landmark was labeled
aria-label="Settings Tabs"even though it contains plain navigation links, not an ARIA tabs widget (norole="tablist"/role="tab"). This mislabeling can mislead assistive technology users about the nature of the control. Changed the label to"Settings".Fixes #1756
Checklist
Summary by CodeRabbit