MudColorPicker: Add opt-out tooltips for icon buttons#11953
MudColorPicker: Add opt-out tooltips for icon buttons#11953danielchalmers merged 4 commits intoMudBlazor:devfrom
Conversation
There was a problem hiding this comment.
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.
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 |
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).