agentleFS
fatih-developerfatih-developer/fth-skills/skills/accessibility-enforcer/SKILL.md

accessibility-enforcer

Skill7 starsChanged 43 days agoMITView on GitHub

Audit mobile UI for iOS VoiceOver, Android TalkBack, and WCAG mobile criteria; find missing labels, small touch targets, and contrast problems, and propose accessible code. Use when the user asks for an accessibility or a11y review of a React Native, Flutter, SwiftUI, or Jetpack Compose screen, or before a mobile release.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Core principle: If VoiceOver or TalkBack can't read it, the button doesn't exist for that user.

    line 10
  2. Very specific:

    Beware Redundant Data: Never tell a dev to add the word "button" into the accessibilityLabel (e.g., "Search Button").

    line 101
  3. Distinctive:

    Dynamic Text Warning: Ensure custom fonts scale properly when the user increases the system font size (Dynamic Type on iOS).

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Accessibility Enforcer Protocol

Accessibility (a11y) on mobile is not a nice-to-have; it's a legal and moral requirement. A screen reader user should be able to navigate, understand, and interact with the app as easily as a sighted user. This skill acts as an automated a11y auditor.

Core principle: If VoiceOver or TalkBack can't read it, the button doesn't exist for that user.


Workflow

1. Identify the UI component / interaction pattern
2. Analyze for specific platform screen reader requirements
3. Check WCAG contrast and touch target sizes
4. Recommend code-level implementations

Step 1: Component Identification

Identify the elements being used:

  • Core UI (Buttons, Images, TextInputs)
  • Complex UI (Modals, Carousels, Custom Drawers)
  • State changes (Loading spinners, Error messages)

Step 2: Screen Reader Analysis

Screen readers need three things from an element:

  1. Focusability: Can the user navigate to it?
  2. Label: What is it called? (e.g., "Submit")
  3. Role/Trait: What does it do? (e.g., "Button")
  4. State: Is it active? (e.g., "Selected", "Disabled")

Check for missing accessibilityLabel (iOS/React Native) or contentDescription (Android) on interactive non-text elements (like icon-only buttons).

Step 3: Interaction & Visual Checks

  • Touch Target Size: Minimum 44x44pt (iOS) or 48x48dp (Android).
  • Color Contrast: WCAG AA requires 4.5:1 for normal text and 3:1 for large text/icons.
  • Focus Order: Does the reading order make logical sense? Does a modal trap focus so the screen reader doesn't read the background?

Step 4: Implementation Recommendation

Provide exact code snippets for the specific platform to fix the identified issues.


Output Format

# ♿ Accessibility Audit Report

**Component / View:** [e.g., Custom Icon Button Navbar]

## 🚨 Critical VoiceOver/TalkBack Issues
*Issues blocking screen reader users from using the feature.*

1. **[Issue Name]** (e.g., Unlabeled Icon Button)
   - **Problem:** [E.g., The search icon button has no label. VoiceOver will just read "Button", leaving the user confused.]
   - **Fix:** [Give the exact code fix, such as adding `accessibilityLabel="Search"` and `accessibilityRole="button"`.]

## ⚠️ UX / Interaction Warnings
*Issues failing WCAG but not completely broken.*

1. **[Warning Area]** (e.g., Touch Target Too Small)
   - **Problem:** [Explanation]
   - **Mitigation:** [Solution, e.g., Add `hitSlop` to increase the touchable area without visually changing the design.]

## 💡 Code Implementation

```javascript/swift/kotlin
// Before (Inaccessible):
<TouchableOpacity onPress={search}>
   <Icon name="search" />
</TouchableOpacity>

// After (Accessible):
<TouchableOpacity 
   onPress={search}
   accessibilityRole="button"
   accessibilityState={{disabled: false}}
   accessibilityLabel="Search"
   accessibilityHint="Opens the search bar to find users"
   hitSlop={{top: 10, bottom: 10, left: 10, right: 10}}
>
   <Icon name="search" />
</TouchableOpacity>
```

When to Skip

  • The task is entirely backend logic or database schema design.

Guardrails

  • Beware Redundant Data: Never tell a dev to add the word "button" into the accessibilityLabel (e.g., "Search Button"). The screen reader will announce "Search Button Button" because of the element's trait.
  • Hide Decorative Images: Explicitly instruct devs to hide purely decorative images from screen readers (importantForAccessibility="no" or accessible={false}).
  • Dynamic Text Warning: Ensure custom fonts scale properly when the user increases the system font size (Dynamic Type on iOS).

References

See references/EXAMPLES.md for a worked case.


🔗 Next Steps & Handoffs

<!-- BEGIN GENERATED: handoffs (generated from the ecosystem workflow map by build_ecosystems.py — do not edit by hand) -->

Ecosystem: @ecosystem-mobile — Mobile App Domain.

Workflows:

  • Pre-Release Audit Flow (mobile-pre-release-audit, step 1 of 3): last step → once it passes, complete the workflow and report the outcome.

Handoff contract: pass results to the next skill through an inline Handoff block in your reply with the fields skill, workflow, created_at, inputs, summary, and next (the handoff contract of @ecosystem-mobile). If a next skill is not installed, continue with its step from the ecosystem map, or install it with npx skills add fatih-developer/fth-skills --skill <name> after the user agrees.

<!-- END GENERATED: handoffs -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.