angular-accessibility
БесплатноБез исполняемых скриптовНе проверенAudit and fix common accessibility issues in Angular templates and Angular Material components. Use when the user mentions Lighthouse, axe, screen readers…
от fmflurry★ 173 звезды на GitHubОб этом скилле
Angular Accessibility (a11y)
When To Activate
- After any development touching Angular templates, including a new feature, bug fix, or refactor
- After updating Angular Material markup, control structure, labels, dialogs, tables, forms, or navigation UI
- Fixing Lighthouse, axe, or ESLint accessibility findings
- Auditing Angular templates or Angular Material screens
- Debugging keyboard navigation, focus order, or screen reader output
- Refactoring interactive UI in Angular HTML templates
Default Post-Development Trigger
Run this skill as a final verification step whenever the implementation modified .html templates or materially changed rendered UI structure, even if the original task did not mention accessibility.
Typical triggers:
- New feature that introduces or changes template markup
- Bug fix that changes form controls, buttons, tables, dialogs, drawers, or navigation
- Refactor that restructures conditionals, loops, landmarks, headings, or interactive elements
- Angular Material component replacement or reconfiguration affecting labels, focus, or keyboard behavior
Hard Rules
- Prefer semantic HTML first: native
<button>,<a>,<label>,<main>,<table>, and<th>before ARIA workarounds - Prefer visible labels,
<label for>,<mat-label>, oraria-labelledbybeforearia-label - Use ARIA to fill missing semantics, not to replace native semantics
- For native elements, bind ARIA with
[attr.aria-*] - For Angular Material components that expose dedicated inputs, prefer
[aria-label]or[aria-labelledby]withoutattr. - Do not add redundant roles to native controls (
role="button"on<button>,role="checkbox"on<input type="checkbox">, etc.) - All user-facing accessible text must be translated with Transloco. Never hard-code text in templates
- After each fix, verify keyboard and focus behavior, not just lint output
Audit Workflow
- Run the ESLint accessibility check first:
npx eslint "src/app/<feature>/**/*.html" - Run an automated audit on the affected screen:
- Lighthouse
- axe DevTools or equivalent
- Perform a keyboard-only smoke test:
Tab/Shift+Tabreaches all interactive controls in a logical orderEnter/Spaceactivates buttons, toggles, and checkboxesEscapecloses dialogs, menus, or drawers where applicable- Focus remains visible throughout the flow
- Spot-check the changed flow with a screen reader
- Fix issues systematically using the patterns below
- Re-run lint and the automated audit on the affected screen
Common Issues & Fixes
1. Icon-only buttons - missing accessible name
Any <button> whose only content is a <mat-icon> or similar icon has no accessible name.
Fix: add a translated accessible name and mark the icon as decorative.
<!-- ❌ Before -->
<button type="button" (click)="onClose()">
<mat-icon>close</mat-icon>
</button>
<!-- ✅ After -->
<button
type="button"
[attr.aria-label]="t('scope.key.close-btn-aria')"
(click)="onClose()"
>
<mat-icon aria-hidden="true">close</mat-icon>
</button>
Same pattern applies to pagination, toggle, toolbar, and other icon-only actions.
2. Form controls - missing programmatic label
Prefer a visible label first. Use aria-label only when a visible label or aria-labelledby is not practical.
Standard forms: use <label for> or <mat-label>.
<!-- ✅ Preferred in a regular form -->
<mat-form-field>
<mat-label>{{ t('scope.key.amount') }}</mat-label>
<input matInput id="amount" type="number" />
</mat-form-field>
Dense table/grid cells: use row-level context so each control is uniquely identifiable.
<!-- ❌ Before -->
<input matInput type="number" [value]="row.amount" />
<mat-select [value]="row.type"></mat-select>
<!-- ✅ After -->
<input
matInput
type="number"
[value]="row.amount"
[attr.aria-label]="t('scope.key.amount-aria', { invoiceNumber: row.invoiceNumber })"
/>
<mat-select
[value]="row.type"
[aria-label]="t('scope.key.type-aria', { invoiceNumber: row.invoiceNumber })"
>
</mat-select>
3. Checkboxes without labels
Empty mat-checkbox components with no projected text need an accessible name.
<!-- ❌ Before -->
<mat-checkbox
[checked]="allSelected()"
(change)="onToggleAll($event.checked)"
/>
<!-- ✅ After - header (select-all) -->
<mat-checkbox
[aria-label]="t('scope.key.select-all-aria')"
[checked]="allSelected()"
(change)="onToggleAll($event.checked)"
/>
<!-- ✅ After - row (select one) -->
<mat-checkbox
[aria-label]="t('scope.key.select-row-aria', { invoiceNumber: row.invoiceNumber })"
[checked]="row.selected"
(change)="onToggleItem(row.id, $event.checked)"
/>
4. Non-semantic interactive elements
Clickable <div> and <span> elements break keyboard and assistive technology behavior.
Fix: replace them with native interactive elements whenever possible.
<!-- ❌
Установить angular-accessibility в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл angular-accessibility?
Audit and fix common accessibility issues in Angular templates and Angular Material components. Use when the user mentions Lighthouse, axe, screen readers, keyboard navigation, ARIA, asks to fix a11y issues in Angular HTML templates, or after any feature, bug fix, or refactor that changed Angular templates.
Как установить скилл angular-accessibility?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл angular-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