All skills
davidortinau avatar

/maui-accessibility

@73e29ff

Guide for making .NET MAUI apps accessible — screen reader support via SemanticProperties, heading levels, AutomationProperties visibility control, programmatic focus and announcements, and platform-specific gotchas for TalkBack, VoiceOver, and Narrator. USE FOR: "add accessibility", "screen reader support", "SemanticProperties", "AutomationProperties", "TalkBack", "VoiceOver", "Narrator", "accessible MAUI", "heading levels", "semantic description", "announce to screen reader", "accessibility audit". DO NOT USE FOR: general UI layout (use maui-collectionview or maui-shell-navigation), animations (use maui-animations), or gestures (use maui-gestures).

Use this Skill: https://skilld.dev/gh/davidortinau/maui-skills/maui-accessibility

This session only. Nothing lands on disk.

referencesaccessibility-api.md

≈614 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Accessibility API Reference

SemanticProperties (Attached Properties)

Set on any VisualElement to provide screen reader context.

Property Purpose
SemanticProperties.Description Accessible name read by screen reader
SemanticProperties.Hint Extra context (e.g. "Double tap to activate")
SemanticProperties.HeadingLevel Heading landmark: None, Level1–Level9

XAML

<Button Text="Save"
        SemanticProperties.Description="Save your changes"
        SemanticProperties.Hint="Double tap to save the current document" />

<Label Text="Settings"
       SemanticProperties.HeadingLevel="Level1" />

C#

var btn = new Button { Text = "Save" };
SemanticProperties.SetDescription(btn, "Save your changes");
SemanticProperties.SetHint(btn, "Double tap to save the current document");

var heading = new Label { Text = "Settings" };
SemanticProperties.SetHeadingLevel(heading, SemanticHeadingLevel.Level1);

Programmatic Focus & Announcements

SetSemanticFocus

Move screen reader focus to an element after a UI change:

errorLabel.Text = "Username is required";
errorLabel.SetSemanticFocus();

SemanticScreenReader.Announce

Push a live announcement without moving focus:

SemanticScreenReader.Announce("File uploaded successfully");

Use Announce for transient status updates. Use SetSemanticFocus when the user must interact with the target element.

AutomationProperties

Control whether an element appears in the accessibility tree.

Property Effect
AutomationProperties.IsInAccessibleTree false hides the element from screen readers
AutomationProperties.ExcludedWithChildren true hides the element and all descendants
<!-- Decorative image — hide from screen reader -->
<Image Source="bg.png"
       AutomationProperties.IsInAccessibleTree="false" />

<!-- Container with purely decorative content -->
<Grid AutomationProperties.ExcludedWithChildren="true">
    <Image Source="pattern.png" />
</Grid>

Deprecated AutomationProperties → SemanticProperties

Deprecated Replacement
AutomationProperties.Name SemanticProperties.Description
AutomationProperties.HelpText SemanticProperties.Hint

Avoid the deprecated properties in new code. They may not work consistently across platforms and will be removed in a future release.

Source: SKILL.md on GitHub

No alerts17d4 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The analyzed skill contains only documentation, code references, and best practices for .NET MAUI accessibility implementation. No malicious patterns, external dependencies, or security risks were identified.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    1 file scanned · No issues

Signed by skilld at 73e29ff. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago

README badge

README badge for davidortinau/maui-skills/maui-accessibility