Skip to content

feat(a11y): make pricing cards keyboard accessible#7

Draft
google-labs-jules[bot] wants to merge 2 commits intomainfrom
palette-pricing-a11y-1161364210111156752
Draft

feat(a11y): make pricing cards keyboard accessible#7
google-labs-jules[bot] wants to merge 2 commits intomainfrom
palette-pricing-a11y-1161364210111156752

Conversation

@google-labs-jules
Copy link
Contributor

This PR addresses an accessibility violation where the pricing plan cards were implemented as non-semantic <div> elements, making them inaccessible to keyboard and screen reader users.

Changes:

  • Converted the div cards to semantic buttons using role="button".
  • Added tabIndex={0} to ensure they are part of the tab sequence.
  • Implemented aria-label using the pattern "Select [Plan Name] plan - $[Price] per month" to provide clear context.
  • Added an onKeyDown handler to support Enter and Space key activation, adhering to WAI-ARIA practices for custom buttons.
  • Added focus-visible styles to provide a visual indicator for keyboard navigation.

Verification:

  • Verified using a custom Playwright script (verify_pricing.py) which confirmed:
    • Elements are reachable via get_by_role("button").
    • Correct aria-labels are present (e.g., "Select Operator plan - $19 per month").
    • tabindex is correct.
  • Visually verified via screenshot that the UI remains consistent.
  • Ran npm run lint in frontend/ to ensure no new errors were introduced (existing errors in other files persist).

Note:
The linting run showed warnings for unused variables e in the new handlers. These are kept for potential future expansion or standard event signature compliance but could be underscored if strict linting is enforced. The existing errors in AgentVisualizer.tsx and SoundManager.ts are unrelated to this change.


PR created automatically by Jules for task 1161364210111156752 started by @cjo93

- Add role="button" to pricing plan cards
- Add tabindex="0" for focusability
- Add dynamic aria-labels for screen reader context
- Add onKeyDown handler for Enter/Space activation
- Add visual focus ring styles
@google-labs-jules
Copy link
Contributor Author

👋 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!


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

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

- Refactor SettingsView to 'System Architecture' dashboard
- Implement 'Connectors' concept (HealthKit, Cosmic/JPL)
- Update copy to 'Machine Calm' tone (Vectors, Schema, Signal Injection)
- Update User type to include connector preferences
- Improve accessibility with ARIA labels and roles
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.

0 participants