Skip to content

🎨 Palette: Enhance input feedback and accessibility#24

Open
CassieMarie0728 wants to merge 1 commit intomainfrom
palette-ux-a11y-enhancements-16888688988936609541
Open

🎨 Palette: Enhance input feedback and accessibility#24
CassieMarie0728 wants to merge 1 commit intomainfrom
palette-ux-a11y-enhancements-16888688988936609541

Conversation

@CassieMarie0728
Copy link
Copy Markdown
Owner

💡 What:

  • Added a real-time character counter (0/500) to the chat composer.
  • Enforced a maxLength={500} on the chat input.
  • Added a descriptive title to the "Say It" button when it's disabled due to empty input.
  • Added role="alert" to the chat error message for immediate screen reader announcement.
  • Improved IntensityToggle accessibility by linking hints via aria-describedby and hiding decorative dots via aria-hidden="true".

🎯 Why:

  • Improves accessibility for screen reader users.
  • Provides immediate visual feedback to users regarding message length limits.
  • Makes the interface more intuitive by explaining disabled states.

♿ Accessibility:

  • Ensured all new auxiliary descriptions (counters, hints) are programmatically associated with their controls.
  • Reduced screen reader noise by hiding decorative indicators.
  • Ensured error messages are announced immediately.

PR created automatically by Jules for task 16888688988936609541 started by @CassieMarie0728

- Add character counter and maxLength to chat composer
- Link auxiliary descriptions using aria-describedby
- Add role="alert" to chat error messages
- Add descriptive title to disabled send button
- Hide decorative dots in intensity toggle from screen readers

Co-authored-by: CassieMarie0728 <[email protected]>
@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.

@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Apr 23, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@gitnotebooks
Copy link
Copy Markdown

gitnotebooks Bot commented Apr 23, 2026

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2026

Deploy Preview for the-fork-chat ready!

Name Link
🔨 Latest commit 3b3cdaf
🔍 Latest deploy log https://app.netlify.com/projects/the-fork-chat/deploys/69ea5950d47ba0000834ef91
😎 Deploy Preview https://deploy-preview-24--the-fork-chat.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the accessibility of the application by implementing programmatic associations for auxiliary descriptions, adding ARIA roles to error messages, and hiding decorative elements from screen readers. Key changes include the addition of a character counter to the chat composer and the use of aria-describedby for input hints. Review feedback suggests improving the accessibility of the send button's state by avoiding the title attribute, which is inaccessible to keyboard and touch users, and addressing redundant screen reader announcements in the intensity toggle by providing an explicit aria-label to separate the button's name from its description.

Comment on lines +222 to +224
title={
draft.trim().length === 0 ? "Write something first" : undefined
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title attribute has significant accessibility limitations: it is generally not accessible to keyboard users (who cannot hover) or touch device users. Furthermore, the current logic only provides a description for the "empty" state, leaving the "loading" state unexplained even though the button is disabled in both cases.

Consider using a visible hint or an aria-live region to provide feedback that is accessible to all users. Alternatively, use aria-disabled="true" instead of disabled to keep the button focusable so that the reason for the disabled state can be announced by screen readers.

              title={
                loading
                  ? "Sending message..."
                  : draft.trim().length === 0
                  ? "Write something first"
                  : undefined
              }

type="button"
role="radio"
aria-checked={active}
aria-describedby={`intensity-hint-${key}`}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding aria-describedby while the hint text is a child of the button creates a redundant announcement. By default, screen readers include all nested text content in the button's accessible name. Linking it again via aria-describedby causes many screen readers to announce the hint twice (once as part of the name and once as the description).

To follow the project's goal of reducing noise (as noted in .Jules/palette.md) while maintaining programmatic association, consider providing an explicit aria-label for the button. This ensures the button's name is concise and the hint is correctly treated as a separate description.

Suggested change
aria-describedby={`intensity-hint-${key}`}
aria-label={meta.label}
aria-describedby={`intensity-hint-${key}`}
References
  1. The learning log suggests linking hints via aria-describedby, but in this specific implementation (nested elements), it leads to redundant announcements which conflicts with the goal of reducing screen reader noise. (link)

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