Skip to content

🎨 Palette: Improve accessibility of Coverage page filter buttons#206

Draft
EffortlessSteven wants to merge 1 commit intomainfrom
palette/coverage-aria-pressed-11926144728776548155
Draft

🎨 Palette: Improve accessibility of Coverage page filter buttons#206
EffortlessSteven wants to merge 1 commit intomainfrom
palette/coverage-aria-pressed-11926144728776548155

Conversation

@EffortlessSteven
Copy link
Member

💡 What: Added aria-pressed attributes 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 and false when inactive.
♿ Accessibility: Improved screen reader support for dynamic filtering.


PR created automatically by Jules for task 11926144728776548155 started by @EffortlessSteven

- 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`.
Copilot AI review requested due to automatic review settings February 17, 2026 02:21
@google-labs-jules
Copy link

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Coverage filter buttons now display active/inactive state indicators for improved accessibility.
    • Filter button states automatically update when switching between options.
  • Tests

    • Added test coverage for filter button accessibility attributes and default states.
  • Documentation

    • Updated guidance on best practices for handling embedded scripts and styles in templates.

Walkthrough

Changes 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

Cohort / File(s) Summary
Documentation
.Jules/palette.md
New guidance section on Maud script escaping via PreEscaped() function for embedded CSS/JS in templates.
HTTP UI Implementation
crates/http-platform/src/ui.rs
Import PreEscaped, wrap coverage styles and scripts with PreEscaped(), add aria-pressed attributes to filter buttons (All defaulting to true), and update filter change handler to manage aria-pressed state dynamically.
Test Coverage
crates/app-http/tests/ui_contract_dom.rs
New test verifying filter buttons have aria-pressed attributes with correct initial states (All=true, Passing=false). Note: test appears duplicated in file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 With buttons now pressed and styles escaping free,
PreEscaped wraps our CSS with glee!
ARIA marks accessibility's way,
As filter buttons dance and sway,
A test ensures they work each day!


Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-pressed attributes 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants