🎨 Palette: Improve accessibility of filter buttons in coverage view#537
🎨 Palette: Improve accessibility of filter buttons in coverage view#537EffortlessSteven wants to merge 1 commit into
Conversation
- Add aria-pressed state to coverage filter buttons - Dynamically update aria-pressed using JS - Improve accessibility of search box with type="search" and aria-label - Mirror changes across both UI component files
|
👋 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. |
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request improves the accessibility of the Acceptance Criteria Coverage UI by adding aria-pressed attributes to the filter buttons, updating them dynamically via JavaScript, and adding an aria-label and type="search" to the search input. The feedback recommends adding safety checks to ensure that document.getElementById does not throw a runtime TypeError if it returns null when retrieving the active filter button.
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.
| const activeBtn = document.getElementById('filter-' + status); | ||
| activeBtn.classList.add('active'); | ||
| activeBtn.setAttribute('aria-pressed', 'true'); |
There was a problem hiding this comment.
If document.getElementById returns null (e.g., due to an unexpected status or DOM state), calling classList.add or setAttribute directly on activeBtn will throw a runtime TypeError and halt subsequent JavaScript execution. Adding a safety check ensures the script fails gracefully.
| const activeBtn = document.getElementById('filter-' + status); | |
| activeBtn.classList.add('active'); | |
| activeBtn.setAttribute('aria-pressed', 'true'); | |
| const activeBtn = document.getElementById('filter-' + status); | |
| if (activeBtn) { | |
| activeBtn.classList.add('active'); | |
| activeBtn.setAttribute('aria-pressed', 'true'); | |
| } |
| const activeBtn = document.getElementById('filter-' + status); | ||
| activeBtn.classList.add('active'); | ||
| activeBtn.setAttribute('aria-pressed', 'true'); |
There was a problem hiding this comment.
If document.getElementById returns null (e.g., due to an unexpected status or DOM state), calling classList.add or setAttribute directly on activeBtn will throw a runtime TypeError and halt subsequent JavaScript execution. Adding a safety check ensures the script fails gracefully.
| const activeBtn = document.getElementById('filter-' + status); | |
| activeBtn.classList.add('active'); | |
| activeBtn.setAttribute('aria-pressed', 'true'); | |
| const activeBtn = document.getElementById('filter-' + status); | |
| if (activeBtn) { | |
| activeBtn.classList.add('active'); | |
| activeBtn.setAttribute('aria-pressed', 'true'); | |
| } |
Test Results283 tests 245 ✅ 11m 49s ⏱️ Results for commit 68e8881. |
💡 What:
Added dynamic
aria-pressedstates to the "All", "Passing", "Failing", and "Unknown" filter buttons in the Acceptance Criteria Coverage view. Also improved the search input by changing its type tosearchand adding anaria-label. The changes were applied to bothcrates/app-http/src/platform/ui.rsandcrates/http-platform/src/ui.rsto maintain consistency.🎯 Why:
The filter buttons visually indicated their active state via a CSS class (
.active), but this state was completely hidden from screen readers. By addingaria-pressed, assistive technologies can now accurately convey which filter is currently applied. The search input was also lacking an accessible name.📸 Before/After:
(Visuals remain unchanged, screen reader experience significantly improved)
♿ Accessibility:
aria-pressed..jules/palette.md.PR created automatically by Jules for task 12563686999770006565 started by @EffortlessSteven