🎨 Palette: Accessible progressive character counter#148
Conversation
Implements a dynamic character counter for the alternative thought input in `ResponseForm.tsx` that provides progressive visual and accessible feedback as the user approaches the 300 character limit. Adds strictly static visually hidden `role="status"` elements at 240, 270, and 300 character thresholds to prevent noisy screen reader updates. Co-authored-by: Sczitzo <46541128+Sczitzo@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What: Added a dynamic character counter that changes color (orange, then red) as the user approaches the input limit, along with conditionally rendered visually hidden status alerts for screen readers.
🎯 Why: The previous character counter was static and lacked accessible warnings. As users approached the limit, they were not visually or audibly warned, leading to potential frustration when input is cut off.
📸 Before/After:
Before:
text-gray-500static counter, no screen reader alerts.After: Progressive color changes (
text-orange-700>text-red-600) and visually hiddenrole="status"messages at specific thresholds. Screenshot attached in verification.♿ Accessibility: Instead of placing
aria-liveon the constantly changing counter (which causes annoying chatter on every keystroke), implemented conditionally rendered static elements at critical thresholds (80%, 90%, 100%) withrole="status"to announce the limit warnings unobtrusively.PR created automatically by Jules for task 13416327536025466625 started by @Sczitzo