🎨 Palette: Improve accessibility of Coverage page filter buttons#206
🎨 Palette: Improve accessibility of Coverage page filter buttons#206EffortlessSteven wants to merge 1 commit intomainfrom
Conversation
- Updates `crates/http-platform/src/ui.rs` to include `aria-pressed` attributes on filter buttons. - Updates embedded JavaScript to toggle `aria-pressed` state on click. - Wraps embedded CSS/JS in `PreEscaped` to prevent HTML entity escaping. - Adds regression test in `crates/app-http/tests/ui_contract_dom.rs`.
|
👋 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 You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Summary by CodeRabbitRelease Notes
WalkthroughChanges introduce ARIA accessibility attributes to coverage filter buttons, implement proper CSS/JS escaping in Maud templates using PreEscaped(), add a test verifying aria-pressed attributes, and document the escaping pattern. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Pull request overview
This PR improves accessibility of the Coverage page filter buttons by adding aria-pressed attributes to indicate active/inactive state to screen readers. It also fixes a critical bug where inline JavaScript and CSS from helper functions would be HTML-escaped, breaking code execution.
Changes:
- Added
aria-pressedattributes to all Coverage page filter buttons with correct initial values - Wrapped inline CSS and JavaScript helper function returns with
PreEscaped()to prevent HTML escaping - Added comprehensive test coverage to verify aria-pressed attributes are present and correct
- Documented the PreEscaped pattern in .Jules/palette.md for future reference
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/http-platform/src/ui.rs | Added PreEscaped import and usage; added aria-pressed attributes to filter buttons; updated JavaScript to manage aria-pressed state dynamically |
| crates/app-http/tests/ui_contract_dom.rs | Added test to verify all filter buttons have aria-pressed attributes with correct default values |
| .Jules/palette.md | Documented the Maud PreEscaped pattern for embedding CSS/JS from helper functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
💡 What: Added
aria-pressedattributes to the filter buttons on the AC Coverage page.🎯 Why: To indicate the active filter state to screen reader users.
📸 Before/After: Filter buttons now expose
aria-pressed="true"when active andfalsewhen inactive.♿ Accessibility: Improved screen reader support for dynamic filtering.
PR created automatically by Jules for task 11926144728776548155 started by @EffortlessSteven