maui-accessibility

为 .NET MAUI 应用提供无障碍实现指南:通过 SemanticProperties 实现屏幕阅读器支持,设置标题层级、使用 AutomationProperties 控制可见性、进行程序化焦点管理与屏幕阅读器播报,并包含针对 TalkBack、VoiceOver 与 Narrator 的平台特定注意事项。适用于添加无障碍功能与审计;不包括通用 UI 布局、动画或手势实现。

仓库最近推送
GitHub Stars
181
Forks
21
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "maui-accessibility":https://skillpi.com/zh/skills/deepskill-a33720182d3b77a07517e226782aeebbce0be2b13c8c226af088e39206b1e333。安装前核对上游来源和版本:https://github.com/davidortinau/maui-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

为 .NET MAUI 应用提供无障碍实现指南:通过 SemanticProperties 实现屏幕阅读器支持,设置标题层级、使用 AutomationProperties 控制可见性、进行程序化焦点管理与屏幕阅读器播报,并包含针对 TalkBack、VoiceOver 与 Narrator 的平台特定注意事项。适用于添加无障碍功能与审计;不包括通用 UI 布局、动画或手势实现。

0 下载

介绍来源: third_party · davidortinau · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: maui-accessibility
description: >
  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).

.NET MAUI Accessibility

Critical Platform Gotchas

1. Don't set Description on Label

Setting SemanticProperties.Description on a Label overrides the Text property for screen readers. The label may be read twice or behave unexpectedly.

<!-- ❌ Stops Text from being read naturally -->
<Label Text="Welcome"
       SemanticProperties.Description="Welcome" />

<!-- ✅ Screen reader reads Text automatically -->
<Label Text="Welcome" />

2. Android Entry/Editor: Description breaks TalkBack actions

On Android, setting SemanticProperties.Description on Entry or Editor causes TalkBack to lose "double tap to edit" action hints.

<!-- ❌ Breaks TalkBack on Android -->
<Entry SemanticProperties.Description="Email address" />

<!-- ✅ Use Placeholder for context instead -->
<Entry Placeholder="Email address" />

3. iOS: Description on parent hides children

On iOS/VoiceOver, setting SemanticProperties.Description on a layout makes the entire container a single accessible element — child elements become unreachable.

<!-- ❌ Children invisible to VoiceOver -->
<HorizontalStackLayout SemanticProperties.Description="User info">
    <Label Text="Name:" />
    <Label Text="Alice" />
</HorizontalStackLayout>

<!-- ✅ Let children be individually focusable -->
<HorizontalStackLayout>
    <Label Text="Name:" />
    <Label Text="Alice" />
</HorizontalStackLayout>

4. Hint conflicts with Entry.Placeholder on Android

On Android, SemanticProperties.Hint and Entry.Placeholder map to the same Android attribute (contentDescription / hint). Setting both causes one to override the other. Choose one.

5. HeadingLevel platform differences

  • Windows (Narrator): Supports all 9 heading levels (Level1–Level9).
  • Android (TalkBack) / iOS (VoiceOver): Only distinguish "heading" vs "not heading". All levels are treated identically.

Use heading levels for semantic correctness — just know the hierarchy only renders on Windows.

Accessibility Checklist

When auditing or retrofitting a page:

  1. Images: Add SemanticProperties.Description to meaningful images. Set AutomationProperties.IsInAccessibleTree="false" on decorative ones.
  2. Buttons/Controls: Ensure icon-only buttons have Description. Text buttons generally don't need it.
  3. Entries/Editors: Use Placeholder for context. Add Hint only if extra instruction is needed. Avoid Description (Android breakage).
  4. Labels: Do not add Description — let Text speak for itself. Add HeadingLevel to section headers.
  5. Headings: Mark page title as Level1, section titles as Level2, etc.
  6. Grouping: Avoid Description on layout containers (iOS breakage). Use ExcludedWithChildren to hide decorative groups.
  7. Dynamic content: Call SemanticScreenReader.Announce for status changes. Use SetSemanticFocus after navigation or error display.
  8. Tab order: Set TabIndex on interactive controls for logical order.
  9. Test: Run TalkBack (Android), VoiceOver (iOS/Mac), and Narrator (Windows) to verify reading order and actions.

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供 .NET MAUI 无障碍访问的完整实现指南
  • 涵盖 SemanticProperties、AutomationProperties、屏幕阅读器支持等核心功能
  • 包含针对 TalkBack、VoiceOver、Narrator 的平台特定注意事项
  • 提供实用的无障碍审计清单和代码示例
触发精准95/100

亮点

  • 触发词覆盖全面,包含 "add accessibility"、"screen reader support"、"SemanticProperties" 等关键词
  • 明确区分适用场景和不适用场景,边界清晰
  • DO NOT USE FOR 部分有效避免与其他 Skill 重叠
结构规范95/100

亮点

  • 结构清晰,分为 Critical Platform Gotchas 和 Accessibility Checklist 两大核心部分
  • 使用编号列表和代码示例展示最佳实践和反模式
  • frontmatter 完整,包含 name 和 description
  • 文档长度适中,易于阅读和理解
执行可靠95/100

亮点

  • 提供具体平台兼容性警告(Android TalkBack、iOS VoiceOver、Windows Narrator)
  • 代码示例明确展示应避免的错误做法和推荐做法
  • 包含端到端的无障碍审计清单,覆盖图片、按钮、输入框、标签等所有关键元素
  • 建议进行多平台测试验证
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。