Skip to content

feat(twake-mui): Name the colors of ColorList - #222

Closed
Crash-- wants to merge 1 commit into
linagora:mainfrom
Crash--:feat/color-list-names
Closed

Crash-- wants to merge 1 commit into
linagora:mainfrom
Crash--:feat/color-list-names

Conversation

@Crash--

@Crash-- Crash-- commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds getColorLabel and aria-pressed to the colors of ColorList, so a screen reader names each one and tells which is selected, and lets an app name and tag the custom color button.

Summary by CodeRabbit

  • New Features
    • Color lists now support customizable labels for individual color options, with hexadecimal codes used by default.
    • The custom-color button supports forwarded accessibility labels, pressed states, test identifiers, and click handling.
    • The default color-list example now uses clearer accessible names for its color options and custom-color control.

Adds getColorLabel, defaulting to the hexadecimal code, and aria-pressed on
each color. customColorProps also takes aria-label, aria-pressed and
data-testid for the custom color button.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

ColorList adds a callback for color button labels and sets each button’s selected state using a case-insensitive color comparison. It also forwards custom button props, including the click handler. Tests cover keyboard activation, labels, selected state, and custom button props. The Default story supplies a color label and an accessible name for the custom color control.

Suggested reviewers: zatteo, jf-cozy

Priority: Not assessed

Change: Feature

Merge Risk: Minimal · up to 307f3

Color labels and selection states can merge with no identified blocking risk. The test suite was not executed.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Crash-- Crash-- closed this Oct 30, 2026
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