capacitor-accessibility
БесплатноБез исполняемых скриптовНе проверенMakes Capacitor apps work with VoiceOver, TalkBack, Dynamic Type / Android font scale, Switch Control, hardware keyboards, Reduce Motion and Increase…
от Cap-go★ 79 звёзд на GitHubОб этом скилле
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-readeror@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.
Procedure
Use a user-selected test device and local web build. Prefer the project-installed axe dependency. Installing or running an npm tool downloads executable code; do so only as part of the requested audit, and preserve the lockfile. Restore device settings after testing.
- Inventory screens into a TODO list (auth, main tabs, forms, modals, media, settings). Audit one at a time.
- Automated pass on the web build: run axe (
@axe-core/playwrightin tests, ornpx @axe-core/cli@latest http://localhost:5173) and fix violations first (names, roles, contrast, labels). - Device pass per screen with VoiceOver and TalkBack, largest text size, Reduce Motion, and a Bluetooth keyboard (iPad). Use the checks in
references/testing.md. - Fix Capacitor-specific traps below.
- Report findings per screen with WCAG criterion, severity, and fix before large refactors; ask before changing design tokens (colors, font sizes).
Capacitor-Specific Traps
- iOS Dynamic Type is ignored by default. WKWebView renders
px/remtext at fixed size regardless of Settings > Accessibility > Larger Text. Options:- CSS:
html { font: -apple-system-body; }and size everything else inrem/em(WebKit maps this to the user's content size category; updates live). - Or
TextZoom.getPreferred()thenTextZoom.set({ value })from@capacitor/text-zoomon launch and onresume. On iPad this requiresios.preferredContentMode: 'mobile'incapacitor.config.*. Pick one, not both, or text scales twice.
- CSS:
- Android font scale applies automatically. Android WebView scales text with the system font size, so fixed-height containers,
line-clamp, and absolute layouts overflow at 200%. Test withadb shell settings put system font_scale 2.0and design for reflow (WCAG 1.4.4, 1.4.10). - Pinch zoom.
zoomEnableddefaults tofalseand many templates shipuser-scalable=no. Users can still scale text via traps 1/2; if you rely on zoom instead, setzoomEnabled: trueand dropuser-scalable=no. - SPA navigation is silent. Route changes do not trigger a page-load announcement. After navigation set
document.title, move focus to the main heading (<h1 tabindex="-1">), or update a polite live region. Do not useScreenReader.speakas the primary mechanism: it only speaks when a screen reader is active and bypasses the user's verbosity settings. - Native views under or over the WebView.
@capacitor/google-mapsrenders a native map behind a transparent WebView region; camera preview plugins do the same. The screen reader sees the WebView, not the native view. Provide an accessible alternative (list of markers, text summary, capture button with label) in HTML. - Native plugin UI. Dialogs, action sheets, share sheets, pickers from official plugins are native and accessible by default; custom native screens in your own plugins need
accessibilityLabel/contentDescription(seereferences/native.md). - Touch targets. Apple HIG minimum 44x44 pt; Material 48x48 dp; WCAG 2.2 2.5.8 minimum 24x24 CSS px. Icon buttons need padding, not just a small SVG.
- Motion and contrast.
prefers-reduced-motionandprefers-contrastmedia queries work in both WebViews. Disable parallax/auto-playing transitions under reduce motion; test Increase Contrast. - Status changes. Toasts (
@capacitor/toastis native and announced), inline errors, spinners: userole="status"/aria-live="polite"for web toasts andaria-busyon loading regions; userole="alert"only for errors. - Focus after native round-trips. After a native modal (camera, share, auth browser) closes, focus may land on
<body>. Restore focus to the triggering control onappStateChange/promise resolution.
Verification
- axe: zero critical/serious violations on each audited route.
- VoiceOver (iOS) and TalkBack (Android): every control has a spoken name, role, and state; swipe order follows visual order; route change is announced or
Установить capacitor-accessibility в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл capacitor-accessibility?
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).
Как установить скилл capacitor-accessibility?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capacitor-accessibility запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic