🎨 Palette: Improve AC Coverage page accessibility and fix inline scripts#199
🎨 Palette: Improve AC Coverage page accessibility and fix inline scripts#199EffortlessSteven wants to merge 1 commit intomainfrom
Conversation
💡 What: - Added `aria-label` to the Acceptance Criteria search input. - Converted filter buttons to accessible toggle buttons using `aria-pressed`. - Fixed a critical issue where inline CSS and JS were being HTML-escaped by `maud`, causing scripts to fail. Used `maud::PreEscaped`. - Added regression test `test_coverage_filters_have_accessibility`. 🎯 Why: - Improves screen reader experience for coverage tools. - Fixes broken filter functionality due to script escaping. ♿ Accessibility: - explicit labels for inputs - semantic toggle state for filters
|
👋 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 CodeRabbit
WalkthroughThis pull request adds accessibility enhancements to the Coverage page UI by introducing ARIA attributes for filter button states, including a search input label, and implementing corresponding state management in templates and JavaScript. A new DOM accessibility test validates these changes. 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 the AC Coverage UI’s accessibility and restores broken filter functionality by preventing Maud from HTML-escaping inline CSS/JS in the coverage page.
Changes:
- Wrap inline
<style>/<script>contents withmaud::PreEscapedso CSS/JS is emitted verbatim. - Add accessibility attributes:
aria-labelon the search input andaria-pressedtoggle state on filter buttons (kept in sync via JS/CSS). - Add a regression DOM test to validate coverage filter accessibility attributes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/http-platform/src/ui.rs | Uses PreEscaped for inline CSS/JS; adds aria-label and aria-pressed support and synchronizes pressed state in the coverage filter UI. |
| crates/app-http/tests/ui_contract_dom.rs | Adds a regression test asserting the coverage page search input and filter buttons include the expected accessibility attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
💡 What:
aria-labelto the Acceptance Criteria search input.aria-pressed.maud, causing scripts to fail (including filter logic) and potential styling issues. Usedmaud::PreEscapedto fix this.test_coverage_filters_have_accessibilityincrates/app-http/tests/ui_contract_dom.rs.🎯 Why:
=>becoming=>), preventing users from filtering the coverage list.📸 Before/After:
div-like buttons. Filters didn't work (JS error).♿ Accessibility:
aria-label="Filter acceptance criteria".aria-pressed="true/false"to filter buttons.aria-pressedstate via JavaScript and CSS.PR created automatically by Jules for task 2108349110075544111 started by @EffortlessSteven