Skip to content

🎨 Palette: Add ARIA roles to status indicators and clarify disabled button states (#42)#268

Draft
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
palette/accessibility-improvements-1518319617021066359
Draft

🎨 Palette: Add ARIA roles to status indicators and clarify disabled button states (#42)#268
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
palette/accessibility-improvements-1518319617021066359

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

💡 What:

  • Added explicit role="img" attributes to the visually-styled Pokédex status lights in the header.
  • Added dynamic title attributes to the disabled "Scan" button (e.g., "System offline or degraded", "Scanning in progress...", "Please select an image first").
  • Centralized the disabled state management of the scan button into a single, predictable function in app.js.

🎯 Why:

  • Empty CSS-styled elements (like the colored status dots) are ignored by screen readers, even if they have aria-labels. Giving them role="img" fixes this.
  • Disabled buttons present an accessibility barrier if users don't know why they are disabled. Adding a dynamic title provides context for mouse hover and screen reader announcements.
  • Centralizing the button state prevents race conditions and makes the JS easier to maintain.

📸 Before/After:

  • Screen readers now announce: "System OK, graphic" instead of silence.
  • Users hovering over the disabled Scan button immediately see why they can't click it.

Accessibility:

  • Improved screen reader discoverability of visual cues.
  • Improved cognitive accessibility and user guidance for blocked actions.

PR created automatically by Jules for task 1518319617021066359 started by @edsonesf

…utton states (#42)

- Added `role="img"` to CSS-styled visual status lights in `index.html` to ensure screen reader discoverability.
- Added a centralized `updateScanButtonState()` function in `app.js` to dynamically set disabled `title` attributes on the "Scan" button explaining *why* it is disabled.
- Removed brittle ad-hoc button toggles across event handlers.
@google-labs-jules

Copy link
Copy Markdown
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!

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


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

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