移动开发

capacitor-accessibility

cap-go/capgo-skills

Makes Capacitor apps work with VoiceOver, TalkBack, Dynamic Type / Android font scale, Switch Control, hardware keyboards, Reduce Motion and Increase Contrast. Covers Capacitor-specific gaps - WKWebView not following iOS Dynamic Type, Android WebView text zoom breaking layouts, zoomEnabled/user-scalable, SPA route changes not announced, native views under the WebView (maps, camera preview) being unreachable, @capacitor/screen-reader (isEnabled, speak, stateChange) and @capacitor/text-zoom (getPreferred, set) - plus testing with Accessibility Inspector, simctl content_size, adb font_scale, TalkBack and axe-core, mapped to WCAG 2.2. Do not use for Ionic component styling (use ionic-design), notch/home-indicator layout (use safe-area-handling), keyboard overlap bugs (use capacitor-keyboard), automated test framework setup (use capacitor-testing), or App Store metadata (use capacitor-app-store).

  • 1222 次安装
  • 74 星标
  • 收录于

安装命令

npx skills add https://github.com/cap-go/capgo-skills --skill capacitor-accessibility

SKILL.md

Accessibility in Capacitor Apps

The UI is web content inside WKWebView / Android WebView, so standard semantic HTML and ARIA do most of the work. This skill covers where the WebView and native layers behave differently from a browser.

When to Use

TRIGGER when:

  • User asks for VoiceOver/TalkBack support, an accessibility audit, WCAG 2.2 / EAA / ADA compliance.
  • Text does not grow with iOS Larger Text, or the layout breaks at large Android font sizes.
  • Screen reader does not announce page changes, toasts, or loading states.
  • A native view (map, camera preview, video player) cannot be reached by the screen reader.
  • User wants @capacitor/screen-reader or @capacitor/text-zoom.

Do not use:

  • Ionic component APIs/theming -> ionic-design; Konsta/Tailwind -> konsta-ui, tailwind-capacitor.
  • Content under notch/home indicator -> safe-area-handling.
  • Keyboard covering inputs -> capacitor-keyboard.
  • E2E test infrastructure -> capacitor-testing.