Skip to content

🎨 Palette: Add progressive warning colors to character limit counter - #158

Open
Sczitzo wants to merge 1 commit into
mainfrom
palette/progressive-char-counter-6267672465963426287
Open

🎨 Palette: Add progressive warning colors to character limit counter#158
Sczitzo wants to merge 1 commit into
mainfrom
palette/progressive-char-counter-6267672465963426287

Conversation

@Sczitzo

@Sczitzo Sczitzo commented Jun 25, 2026

Copy link
Copy Markdown
Owner

💡 What: Added progressive color warnings (orange at >80%, red at >90%) to the alternativeThought character counter in ResponseForm.tsx and a separate visually hidden "Character limit reached" status message.

🎯 Why: To provide better visual feedback to users as they approach the maximum input length, preventing them from unexpectedly hitting a wall, and doing so in a way that is accessible without spamming screen readers with every keystroke update.

📸 Before/After: The text counter changes from text-gray-500 to text-orange-700 font-medium (240+ chars) to text-red-600 font-bold (270+ chars). A screenshot demonstrates the red warning state.

♿ Accessibility: Instead of adding aria-live to the dynamic numbers (which causes excessive noise), a separate, purely static <div role="status" className="sr-only">Character limit reached</div> element conditionally renders only when the limit is exactly reached, guaranteeing a clean single announcement.


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

- Added dynamic text color changes to `alternativeThought` character counter (`text-orange-700` at 240 chars, `text-red-600` at 270 chars).
- Added a visually hidden `role="status"` element that appears only when the 300 character limit is reached to provide accessible feedback without excessive `aria-live` noise.
- Documented learning in Palette Journal.

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