-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
MudColorPicker: Add opt-out tooltips for icon buttons #11953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MudColorPicker: Add opt-out tooltips for icon buttons #11953
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds tooltips to icon buttons in the MudColorPicker component to improve accessibility and user experience. The tooltips are opt-out by default and use existing localization strings.
- Adds a
ShowTooltipsproperty (default: true) to control tooltip display - Wraps icon buttons with
MudTooltipcomponents using existing localization strings - Updates formatting for consistency
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| MudColorPicker.razor.cs | Adds ShowTooltips property to enable/disable tooltips |
| MudColorPicker.razor | Wraps icon buttons with tooltip components and improves formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this 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 introduces tooltips for the icon buttons in the MudColorPicker component, improving accessibility and user experience. The change is well-implemented by adding a ShowTooltips property to control their visibility, defaulting to true to make this an opt-out feature. My review found one issue: the new ShowTooltips property is missing the [Parameter] attribute, which prevents it from being configured in markup. Once this is addressed, the PR should be ready for merging.
|
Taken from #11377 |
igotinfected
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This adds tooltips to the icon buttons in the Color Picker to help overall accessibility. They use the same localization strings as the ARIA labels (no extra setup) and can be disabled if wanted. They are opt-out instead of opt-in as the risk should be low while the benefit in usability is noticeable.
These icons (and this component) were specifically picked because the purpose may not be immediately understandable for most users, unlike standard icons like a pencil for edit, a gear for settings, a palette for the adornment, etc.
They use the default tooltip timings (instantly appears) which can be changed in MudGlobal.
Checklist:
dev).