Skip to content

🎨 Palette: Accessible progressive character counter#149

Open
Sczitzo wants to merge 1 commit into
mainfrom
palette-accessible-char-counter-13990461125492619451
Open

🎨 Palette: Accessible progressive character counter#149
Sczitzo wants to merge 1 commit into
mainfrom
palette-accessible-char-counter-13990461125492619451

Conversation

@Sczitzo

@Sczitzo Sczitzo commented Jun 16, 2026

Copy link
Copy Markdown
Owner

💡 What:

  • Updated the character counter to provide progressive visual feedback (orange at 240, red at 300 characters).
  • Added strictly static visually hidden elements with role="status" that only appear at key limits to warn screen readers without noisy keystroke updates.
  • Removed a redundant aria-describedby="automaticThought-desc" from the optional automatic thought textarea, and its corresponding id on the span.

🎯 Why:

  • Continuous character counters linked via aria-live or similar mechanisms cause overwhelming screen reader updates. Soft warnings at 80% and 100% capacity are safer and much more usable.
  • The aria-describedby pointing to a span inside the <label> caused screen readers to announce "Automatic Thought (Optional)" and then immediately read "(Optional)" a second time.
  • Visually, color-coding the limit approaches improves awareness for sighted users without requiring them to read tiny numbers.

📸 Before/After:
N/A - Minor visual text color tweaks and hidden accessibility fixes.

♿ Accessibility:

  • Fixes double announcement issue on the Automatic Thought input label.
  • Improves screen reader experience for text limits by using discrete state-driven warnings rather than noisy continuous updates.

PR created automatically by Jules for task 13990461125492619451 started by @Sczitzo

- Updated character counter to use distinct visual color warnings as it approaches the limit.
- Added visually hidden `role="status"` alerts for threshold warnings rather than live continuous counting.
- Removed duplicated screen reader descriptions tied to `automaticThought` by deleting redundant `aria-describedby` that doubled the text already found in the `<label>`.

Co-authored-by: Sczitzo <46541128+Sczitzo@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

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

1 participant