A static helper class providing accessibility utilities for Daisy controls. It simplifies setting up screen reader support across all controls.
Namespace:Flowery.Services
DaisyAccessibility provides:
AutomationProperties.NameSet custom screen reader text on any Daisy control:
<daisy:DaisyButton
Content="🗑️"
services:DaisyAccessibility.AccessibleText="Delete item" />
xmlns:services="using:Flowery.Services" to your XAML namespace declarations.This ensures screen readers announce "Delete item" instead of the emoji.
| Method | Description |
|---|---|
GetAccessibleText(obj) |
Gets the accessible text for a control |
SetAccessibleText(obj, value) |
Sets the accessible text for a control |
SetupAccessibility |
Registers accessibility handling for a control type (for control authors) |
GetEffectiveAccessibleText(control, defaultText) |
Gets accessible text with fallback to default |
ApplyAccessibility(control, defaultText) |
Applies the effective accessible text to AutomationProperties.Name |
Flowery controls respond automatically to Windows contrast themes and the Windows animation setting.
These settings do not add another Flowery theme to the theme list.
In a Windows contrast theme, the default palette uses system background, text, selection, and disabled-text colors.
Glass panels use opaque surfaces. Decorative blur, reflections, and neumorphic shadows stop.
See DaisyThemeManager for palette behavior and custom theme applicators.
If Windows animations are disabled, animated controls show readable content without decorative motion.
See Effects for stop, completion, and resume behavior.
These controls expose values through UI Automation in addition to their accessible names:
| Control | Pattern | Value |
|---|---|---|
DaisyRange |
RangeValue |
Numeric value, limits, and step sizes. |
DaisyRating |
RangeValue |
Rating value, maximum, and precision. IsReadOnly prevents changes. |
DaisyColorSlider |
RangeValue |
Numeric channel value and limits. |
DaisyColorWheel, DaisyColorGrid |
Value |
Color text in #AARRGGBB format. SetValue accepts a valid color string. |
Disabled controls reject changes through these patterns.
Numeric selectors reject values outside their limits. Value changes raise the corresponding UI Automation property event.
The automation peers are internal. Applications use the standard UI Automation patterns.
The Kanban board also exposes selection and card invocation patterns.
When creating a new Daisy control, call SetupAccessibility in the static constructor and ApplyAccessibility in OnApplyTemplate:
using Flowery.Services;
public class DaisyMyControl : Control
{
static DaisyMyControl()
{
DaisyAccessibility.SetupAccessibility<DaisyMyControl>("My Control");
}
protected override void OnApplyTemplate()
{
base.OnApplyTemplate();
DaisyAccessibility.ApplyAccessibility(this, "My Control");
}
}
This:
1. Registers a default accessible text for the control type
2. Applies it to AutomationProperties.Name when the template is applied
3. Automatically syncs any custom AccessibleText changes to AutomationProperties.Name
<daisy:DaisyButton
services:DaisyAccessibility.AccessibleText="Search">
<PathIcon Data="{StaticResource SearchIcon}" />
</daisy:DaisyButton>
<daisy:DaisyStatusIndicator
Status="Online"
services:DaisyAccessibility.AccessibleText="User is currently online" />
<daisy:DaisyRating
Value="4"
services:DaisyAccessibility.AccessibleText="Rating: 4 out of 5 stars" />
1. Always set AccessibleText for icon-only controls - Screen readers can't interpret icons
2. Be descriptive but concise - "Delete" is better than "Click to delete this item from the list"
3. Include state information - "Mute (currently unmuted)" is more helpful than just "Mute"
4. Test with a screen reader - Windows Narrator (Win+Ctrl+Enter) or NVDA