skills.vishalvoidskills/vishalvoid
Technical & DevelopmentIntermediate

flutter-improving-accessibility

Configure Flutter for screen readers and assistive tech

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/flutter/skills --skill flutter-improving-accessibility

Overview

What This Skill Does

Configure Flutter for screen readers and assistive tech

Application

When to use this Skill

Documentation

Show Skills.md file

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 their 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 catalog of accessibility widgets to manipulate the semantics tree exposed to assistive technologies (like TalkBack or VoiceOver).

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

Web Accessibility

Lines 1 - 25 of 102

Recommendations

Explore other random skills

All skillsMy patterns