AGENT SKILL

flutter-improving-accessibility

Configures a Flutter app to support assistive technologies like Screen Readers. Use when ensuring an application is usable for people with disabilities.

License 许可
MIT
最近更新
2026-06-13
Stars
★ 3
Forks
1

01 前言 Front Matter

name
flutter-improving-accessibility
description
Configures a Flutter app to support assistive technologies like Screen Readers. Use when ensuring an application is usable for people with disabilities.

03 SKILL.md 正文

Implementing Flutter Accessibility

Contents

UI Design and Styling

Design layouts to accommodate dynamic scaling and high visibility. Flutter automatically calculates font sizes based on OS-level accessibility settings.

  • Font Scaling: Ensure layouts provide sufficient room to render all contents when font sizes are increased to maximum OS settings. Avoid hardcoding fixed heights on text containers.
  • Color Contrast: Maintain a contrast ratio of at least 4.5:1 for small text and 3.0:1 for large text (18pt+ regular or 14pt+ bold) to meet W3C standards.
  • Tap Targets: Enforce a minimum tap target size of 48x48 logical pixels to accommodate users with limited dexterity.

Accessibility Widgets

Utilize Flutter's accessibility widgets to manipulate the semantics tree exposed to assistive technologies (TalkBack, VoiceOver).

  • Semantics: Annotate the widget tree with descriptions of widget meaning. Assign specific roles using SemanticsRole enum (e.g., button, link, heading) for custom components.
  • MergeSemantics: Wrap composite widgets to merge semantics of all descendants into a single selectable node for screen readers.
  • ExcludeSemantics: Drop semantics of all descendants, hiding redundant or decorative sub-widgets from accessibility tools.

Workflows

Accessibility Implementation Checklist

  • [ ] Verify all interactive elements have a minimum tap target of 48x48 pixels.
  • [ ] Test layout with maximum OS font size settings — no text clipping or overflow.
  • [ ] Validate color contrast ratios (4.5:1 for normal text, 3.0:1 for large text).
  • [ ] Wrap custom interactive widgets in Semantics with appropriate SemanticsRole.
  • [ ] Group complex composite widgets using MergeSemantics.
  • [ ] Hide decorative elements from screen readers using ExcludeSemantics.

Accessibility Validation Loop

  1. Execute accessibility tests or use OS screen readers (VoiceOver/TalkBack) to navigate the view.
  2. Identify unannounced interactive elements, trapped focus, or clipped text.
  3. Apply Semantics, adjust constraints, or modify colors. Repeat until screen reader provides clear traversal.

Examples

Custom Component Semantics

class CustomListItem extends StatelessWidget {
  final String text;
  const CustomListItem({super.key, required this.text});

  @override
  Widget build(BuildContext context) {
    return Semantics(
      role: SemanticsRole.listItem,
      label: text,
      child: Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          text,
          style: const TextStyle(fontSize: 16),
        ),
      ),
    );
  }
}

04 同仓库更多 Skills

openplaybooks-dev
openplaybooks-dev/converge

hello-checker

Use this skill when asked to "verify", "check", or "validate" a file's existence and content. It provides a reliable workflow for confirming files meet their spec.

★ 3
openplaybooks-dev
openplaybooks-dev/converge

ask-skill

暂无简介

★ 3
openplaybooks-dev
openplaybooks-dev/converge

html-review-artifact

Framework-wide guidance for crafting polished human-review artifacts as markdown or HTML

★ 3
openplaybooks-dev
openplaybooks-dev/converge

converge-planning

Design a Converge playbook end-to-end. Use when the user says "plan a project", "design a playbook", "decompose into tasks", "scaffold a Converge workflow", "onboard to Converge", or asks how to write TASK.md / playbook.yml. Two entry points: plan a new playbook or update an existing one. Hand off to `/converge-control` after producing the playbook structure.

★ 3
openplaybooks-dev
openplaybooks-dev/converge

converge-control

Operate a Converge playbook end-to-end — start runs, monitor progress, narrow failures with `--select`, inspect runtime state, validate definitions, surgically reset subtrees, and stop stuck or orphaned runs. Use this skill whenever the user says "run my playbook", "execute this", "monitor the run", "converge failed", "the run is stuck", "retry failures", "babysit this playbook", "what's the status?", "show me the gantt", or asks how to use `converge run` / `--select` / `inspect` / `doctor` / `clean` / `stop`. Also use it for `HTTP 401` / `Invalid API key` failures on the first task — those are environment-not-playbook problems — and for any post-run cleanup work. Hand off to `converge-planning` if the user wants to design or restructure the playbook itself.

★ 3
openplaybooks-dev
openplaybooks-dev/converge

repair-taskts

Fix task.ts definition issues — Seed syntax, missing .build(), empty checks, import errors, TypeScript errors

★ 3