Logo Accessibility Testing

Accessibility Testing

Cộng đồng
petrkindlmann
accessibility-testing

Test for WCAG 2.2 AA compliance with axe-core + Playwright, keyboard navigation audits, screen reader testing, ARIA pattern validation, and legal compliance mapping (ADA, EAA, Section 508). Automated tools catch 30-40% of issues — this skill covers automated and manual testing together. Use when: "accessibility," "a11y," "WCAG," "screen reader," "axe," "keyboard navigation," "ARIA," "ADA compliance." Not for: cookie-consent/GDPR compliance — use compliance-testing; pixel-diff visual regression — use visual-testing. Related: playwright-automation, compliance-testing, visual-testing, ci-cd-integration.

Tổng quan

Nhà phát hànhpetrkindlmann
Kho mãqa-skills
Tên kỹ năngaccessibility-testing
Sao
205
Bản fork
35
Tệp đi kèm
2
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được petrkindlmann công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Accessibility Testing trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/petrkindlmann/qa-skills/tree/main/skills/accessibility-testing
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/petrkindlmann/qa-skills.git /tmp/qa-skills
mkdir -p .claude/skills
cp -r /tmp/qa-skills/skills/accessibility-testing .claude/skills/accessibility-testing
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Accessibility Testing trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Accessibility Testing ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Accessibility Testing không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Discovery Questions

Check .agents/qa-project-context.md first — if it exists, use it as the foundation and skip anything already answered.

Requirements and compliance (sets the target level and audit obligations)

  • What WCAG conformance level is required — A, AA, or AAA? AA is the practical legal default.
  • What laws apply — ADA, EAA/EN 301 549, Section 508, AODA? Each maps to a WCAG level.
  • Is there a VPAT or accessibility statement to maintain, or contractual a11y clauses from enterprise/government customers?

Current state (tells you whether you're auditing or preventing regressions)

  • Has an audit run before? What were the findings, and what's already in the backlog?
  • Does the design system carry accessibility guidance and accessible components?

Testing infrastructure (determines what you can automate vs. must do by hand)

  • Is automated a11y testing already in CI?
  • Which screen readers does the team test with — VoiceOver, NVDA, JAWS, TalkBack?

Core Principles

  1. Automated testing catches 30-40% of issues — no more. axe-core finds missing alt text, low contrast, missing labels, and invalid ARIA. It cannot tell you whether alt text is meaningful, whether tab order is logical, or whether a custom widget is operable. Passing axe is necessary, not sufficient. Crucially, axe ships no automated rule for several WCAG 2.2 success criteria (2.4.11 focus-not-obscured, 2.5.7 dragging movements, and 2.5.8 target-size only partially) — a green axe run does not equal 2.2 AA conformance.

  2. Semantic HTML first, ARIA as last resort. Native elements (<button>, <nav>, <input>, <dialog>) carry built-in semantics, keyboard behavior, and screen reader support. A <div role="button"> also needs tabindex, Enter/Space handlers, focus styles, and ARIA state — all of which a <button> gives you free. Reach for ARIA only when no native element fits.

  3. Test in impact order: keyboard, screen reader, automated. Keyboard issues physically block users from features (highest impact). Screen reader issues confuse with wrong announcements. Automated checks catch the mechanical remainder. Start where the damage is worst, not where the tooling is easiest.

  4. Accessibility is a quality attribute, not a feature. Test it continuously like performance or security — every new component, every PR. Retrofitting accessibility onto a finished product costs 10-100x more because inaccessible patterns get baked into the component library.

  5. Test with real assistive technology. Browser DevTools and axe extensions are dev aids, not substitutes for VoiceOver (macOS/iOS), NVDA (Windows), and TalkBack (Android), which each behave differently. Reserve manual AT passes for complex custom widgets.

Automated Scanning with axe-core + Playwright

Install @axe-core/playwright pinned to an exact version from npm view @axe-core/playwright version (4.14.0 on 2026-10-21; its minor tracks axe-core's, so a new rule set arrives with every bump and must be reviewed, not auto-updated). Wrap it in a reusable checkAccessibility(page, testInfo, options) helper that filters to the WCAG tags ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa']. Require an expected URL and an application-owned readiness assertion before scanning: blank, error, and redirected pages can pass axe. Attach the full results JSON, reject a scan that evaluated no rules, and assert violations.toHaveLength(0). The exported scanAccessibility helper returns the violation summary for known-gap baselines; checkAccessibility requires zero violations. Loop it over every key page and over interactive states (modal open, menu expanded, signed-in account), not just the default load. For a third-party page you cannot fix, assert the exact set of known rule ids instead of skipping the scan, so a new violation or a fixed one changes the test.

Suppress a rule only with a documented justification (a tracking issue or inline comment) and exclude third-party widgets you don't own rather than disabling the rule globally.

See references/recipes.md for the install command, RGAA tag caveat, the full helper, the page-loop and interactive-state specs, rule suppression, and CI integration.

Manual Testing Checklist

Automated scanning is the floor. These checks need a human (or a keyboard-driven Playwright spec — see references/recipes.md for the keyboard specs).

Keyboard navigation audit

  • Tab order is logical — left-to-right, top-to-bottom for LTR. No surprise focus jumps.
  • All interactive elements reachable via Tab / Shift+Tab.
  • Focus indicator visible on every focused element. No outline: none without a replacement.
  • Skip link works — first Tab reveals "Skip to main content"; Enter moves focus to <main>.
  • Enter activates buttons/links; Space activates buttons and toggles checkboxes.
  • Escape closes modals, dropdowns, tooltips; focus returns to the trigger.
  • Arrow keys navigate within tabs, menus, radio groups, tree views.
  • No keyboard traps (modal dialogs intentionally trap until dismissed — that's allowed).
  • Custom widgets operable without a mouse (sliders, date pickers, drag-and-drop).

Screen reader testing

Screen ReaderOSBrowserFree?
VoiceOvermacOS/iOSSafariYes (Cmd+F5)
NVDAWindowsFirefox/ChromeYes
JAWSWindowsChrome/EdgeNo
TalkBackAndroidChromeYes
  • Page title announced on navigation.
  • Headings form a navigable outline (h1 → h2 → h3, no skipped levels).
  • Images have descriptive alt text (or alt="" for decorative).
  • Form inputs announce their labels when focused.
  • Required fields announced as required; errors associated with their input.
  • Live regions announce dynamic content (toasts, loading states).
  • Buttons/links announce their purpose (no "click here").

Color contrast and visual

  • Normal text: 4.5:1 minimum (WCAG AA). Large text (18pt+ / 14pt+ bold): 3:1.
  • UI components and graphical objects: 3:1 against adjacent colors.
  • Information never conveyed by color alone — add icons, patterns, or text.

Form and error accessibility

  • Every input has a visible <label> tied via for/id (placeholder is not a label).
  • Required fields indicated visually and programmatically (required / aria-required).
  • Errors use aria-describedby to link to the input and role="alert" to announce.
  • Focus moves to the first error on submission failure.
  • Related fields grouped with <fieldset> and <legend>.

WCAG 2.2 Quick Reference

Level A (must fix)

CriterionWhat it meansCommon failure
1.1.1 Non-text ContentImages have alt text<img> without alt
1.3.1 Info and RelationshipsStructure via HTML semantics<div> styled as a heading
2.1.1 KeyboardAll functionality via keyboardCustom widget responds only to mouse
2.4.1 Bypass BlocksSkip navigation linkNo skip link
3.1.1 Language of Page<html lang="en"> setMissing lang
3.3.1 Error IdentificationErrors described in textError shown only by red border
4.1.2 Name, Role, ValueCustom controls expose name/role<div onclick> with no role

Level AA (most common legal requirement)

CriterionWhat it meansCommon failure
1.4.3 Contrast (Minimum)4.5:1 normal, 3:1 largeLight gray on white
1.4.4 Resize TextScales to 200% without lossFixed-height containers clip text
1.4.11 Non-text ContrastUI components 3:1Low-contrast input borders
2.4.7 Focus VisibleKeyboard focus visibleoutline: none with no replacement
2.5.8 Target SizeTouch targets 24×24px minTiny icon buttons
3.3.2 Labels or InstructionsInputs have labelsPlaceholder as the only label
3.3.8 Accessible AuthNo cognitive function testCAPTCHA with no alternative

Level AAA (nice to have)

CriterionWhat it means
1.4.6 Contrast (Enhanced)7:1 normal text, 4.5:1 large
2.4.9 Link Purpose (Link Only)Link text alone describes destination
3.1.5 Reading LevelLower-secondary education level

Accessible Patterns

Test on the accessible tree (roles, names, ARIA state), not on CSS. The patterns you need runnable tests for:

  • Forms — error linked via aria-describedby, aria-invalid='true', focus on first error.
  • Modal/dialog — aria-modal='true', aria-labelledby, focus trapped, Escape returns focus.
  • Interactive states — opened dropdown (role="menu" or role="listbox", aria-expanded), loading skeleton (aria-busy='true' during fetch), toast (aria-live='polite'). These carry different ARIA per state, so click to trigger the state change and assert the open-state ARIA — the default page snapshot never exercises them.
  • Data tables — columnheader roles, aria-sort reflects the active sort.
  • Landmarks — exactly one main; banner, navigation, contentinfo present.

See references/patterns.md for the full runnable tests for every pattern above.

ARIA Snapshots

Playwright's toMatchAriaSnapshot() captures the accessible tree as YAML and asserts against it — the fastest way to catch a regression where a visual change silently breaks semantics (a <div> restyled to look like a button, a heading demoted to plain text). It checks structure and accessible names, not pixels, so it's complementary to visual-testing, not a replacement. Scope snapshots to a stable container; whole-page snapshots over async content go flaky. See references/patterns.md for navigation and form snapshot examples.

Legal Compliance Mapping

Law / StandardRegionWCAG level requiredEnforcement
ADAUSAAA (court precedent)Lawsuits (private right of action)
Section 508USA (federal)WCAG 2.0 AAFederal procurement requirement
EAAEUEN 301 549 (WCAG 2.1 AA)In force since 28 June 2025. Member states actively enforcing; private cause of action varies (DE, FR, IE most active). EN 301 549 expected to align with WCAG 2.2 next revision.
AODAOntario, CanadaWCAG 2.0 AAFines up to $100K/day
EN 301 549EUWCAG 2.1 AAPublic procurement requirement
Equality Act 2010UKWCAG 2.1 AA (guidance)Lawsuits
ISO/IEC 40500:2025InternationalEquivalent to WCAG 2.2 (Oct 2023)Useful for procurement/RFP language; freely available from ISO

Practical target: if you serve US or EU users, WCAG 2.2 AA is the target for new development — the EAA is in force, EN 301 549 is expected to update to 2.2, and ISO/IEC 40500:2025 (published Sept 2025) codifies WCAG 2.2 internationally. WCAG 2.1 AA is the legacy minimum where 2.2 can't be reached immediately.

WCAG 3 status: W3C published an updated WCAG 3 working draft in March 2026 that renamed "Outcomes" to "Requirements" and moved away from binary pass/fail grading; it lists ~174 requirements. It remains a working draft — Candidate Recommendation is targeted for Q4 2027 and a Recommendation not before 2028. Plan for WCAG 2.2 today; track WCAG 3 but do not test against it yet.

Audit evidence to collect: automated scan results per page, manual checklists with tester/date, screen reader results with AT versions, accessibility statement, VPAT for enterprise sales, and a remediation plan for known issues. For the full legal/VPAT/consent mapping, see compliance-testing.

Anti-Patterns

Only automated testing

Running axe, finding zero violations, and declaring the product accessible. Automated tools miss 60-70% of real issues and skip several WCAG 2.2 criteria entirely. Fix: pair every axe run with the keyboard and screen reader checklist; gate releases on both, not just the scan.

ARIA overuse

Adding role, aria-label, and aria-describedby to elements that already have native semantics, creating double announcements. Fix: delete the redundant ARIA and use the native element — a <button> never needs role="button".

Ignoring keyboard users

Features that work by mouse and touch but not keyboard — click-only dropdowns, drag-and-drop with no keyboard path, hover-only tooltips. Fix: give every mouse interaction a keyboard equivalent and cover it with a keyboard.spec.ts test (see references/recipes.md).

Retrofitting accessibility

Waiting until the product is "finished," by which point inaccessible patterns are baked into the component library at 10-100x the fix cost. Fix: add an axe check to the Definition of Done so every new component is gated on accessibility before merge.

Treating accessibility as optional

Deprioritizing a11y tickets because "nobody complained" — users with disabilities can't complain through a product they can't use, so they leave silently, and US web-accessibility lawsuits have climbed year over year since 2018. Fix: track a11y as a release blocker with the same severity rules as functional bugs, and report open a11y issues in the release readiness check.

Testing only the happy path

Scanning only the default page state, missing the modals, expanded dropdowns, error messages, and loading skeletons that carry different ARIA. Fix: drive each interactive state in the test (click to open the menu, trigger the fetch) and re-run the scan against the changed DOM.

Failure Modes

SymptomLikely causeFix or check
axe finds 0 violations but the page is unusable by keyboardAutomated scans don't test operability or focus orderRun the keyboard audit; add a keyboard.spec.ts
toMatchAriaSnapshot is flakyDynamic content or list reordering inside the snapshot scopeScope to a stable container; use a partial snapshot
Contrast rule passes but text over a gradient/overlay/image is unreadableaxe can't compute contrast against non-solid backgroundsCheck those cases manually or with a contrast picker
Passing axe but failing a WCAG 2.2 AA auditaxe ships no rule for 2.4.11 / 2.5.7 and only partial 2.5.8Manually verify focus-not-obscured, dragging alternatives, and target size

Verification

Prove the suite actually exercises the page — an a11y test that passes vacuously (wrong URL, axe scanning an error page, snapshot never reached) is worse than none.

  1. Confirm axe is scanning real content. Point the helper at a page you know has a violation (e.g. temporarily remove a <label>) and run it — the test must FAIL and name the rule:
    bash
    npx playwright test e2e/tests/a11y/pages.spec.ts
    If a page with a planted defect still passes, AxeBuilder is scanning the wrong DOM (redirect, blank page, or wrong selector) — fix that before trusting any green run.
  2. Confirm the keyboard specs reach the app, not a 404. Run npx playwright test e2e/tests/a11y/keyboard.spec.ts and open the trace for the skip-link test — the first Tab should land on the skip link, not nowhere. A test that "passes" because the page never loaded is a false green.
  3. Confirm the CI gate blocks. Introduce one serious violation on a branch and push — the a11y job must exit non-zero and fail the PR check. Revert after.
  4. Spot-check an ARIA snapshot. Run toMatchAriaSnapshot once with --update-snapshots, then again without — the second run must pass. If it flakes, the snapshot scope includes async/reordering content; narrow it to a stable container.

Done When

  • axe-core integrated into the E2E suite and run automatically on all key user-facing pages identified in the test strategy.
  • CI reports zero critical or serious axe violations and blocks merge when any are introduced (see references/recipes.md for the workflow).
  • Keyboard navigation tested end-to-end for all interactive flows (forms, modals, dropdowns, navigation menus).
  • Interactive-state ARIA verified for at least one dropdown/menu (aria-expanded + role), one loading region (aria-busy), and one live region (aria-live).
  • Color contrast validated for the full brand palette against WCAG AA thresholds (4.5:1 normal text, 3:1 large text and UI components).
  • Screen reader test notes documented for complex custom widgets (date pickers, data tables, drag-and-drop), including which screen reader and version was used.

Related Skills

  • playwright-automation — the test runner for both axe scans and keyboard/ARIA snapshot tests; this skill adds the accessibility-specific patterns on top.
  • compliance-testing — legal/regulatory testing including cookie consent (GDPR/CMP), VPAT generation, and EAA/Section 508 reporting. Go there for consent banners and formal compliance documentation; stay here for WCAG conformance testing.
  • visual-testing — pixel-diff screenshot regression. Use it for visual rendering changes; use this skill's ARIA snapshots for semantic-tree regressions and contrast for the a11y-specific color thresholds.
  • ci-cd-integration — running a11y tests in CI and blocking merges on violations.
  • risk-based-testing — prioritizes which pages and components to audit first.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Accessibility Testing làm được gì?

Test for WCAG 2.2 AA compliance with axe-core + Playwright, keyboard navigation audits, screen reader testing, ARIA pattern validation, and legal compliance mapping (ADA, EAA, Section 508). Automated tools catch 30-40% of issues — this skill covers automated and manual testing together. Use when: "accessibility," "a11y," "WCAG," "screen reader," "axe," "keyboard navigation," "ARIA," "ADA compliance." Not for: cookie-consent/GDPR compliance — use compliance-testing; pixel-diff visual regression — use visual-testing. Related: playwright-automation, compliance-testing, visual-testing, ci-cd-in...

Vì sao nên dùng Accessibility Testing trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Accessibility Testing là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Accessibility Testing trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/petrkindlmann/qa-skills/tree/main/skills/accessibility-testing. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Accessibility Testing?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Accessibility Testing với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Accessibility Testing với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Accessibility Testing có miễn phí không?

Có. Kỹ năng này được petrkindlmann phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇