Logo Axe Rules

Axe Rules

Cộng đồng
mgifford
axe-rules

Tải kỹ năng này khi cấu hình các lượt quét axe-core, xem xét kết quả kiểm thử khả năng truy cập tự động hoặc viết kiểm thử dùng @axe-core/playwright, @axe-core/react hay các tích hợp tương tự. Cung cấp tài liệu tra cứu nhanh về ID quy tắc axe 4.x, ánh xạ WCAG và mức độ nghiêm trọng mặc định.

Add to TypingMind

Tổng quan

Nhà phát hànhmgifford
Kho mãaccessibility-skills
Tên kỹ năngaxe-rules
Sao
57
Bản fork
5
Tệp đi kèm
1
Giấy phépAGPL-3.0
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 dùng hướng dẫn viết bằng Markdown thay vì 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ộ.

  • 1 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 mgifford công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Axe Rules 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 của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/mgifford/accessibility-skills/tree/main/skills/axe-rules
  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/mgifford/accessibility-skills.git /tmp/accessibility-skills
mkdir -p .claude/skills
cp -r /tmp/accessibility-skills/skills/axe-rules .claude/skills/axe-rules
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 Axe Rules 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ự nạp Axe Rules 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 bạn có thể dùng Axe Rules với cả những mô hình khác ngoài mô hình ban đầu. 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 khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổ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.

Axe-Core Rules Reference Skill

Canonical source: examples/AXE_RULES_REFERENCE.md and examples/AXE_RULES_COVERAGE.md in mgifford/ACCESSIBILITY.md This skill is derived from those files. When in doubt, the example is authoritative. Note: the canonical files are organized around a specific test-fixture scanner project (numbered test pages). This skill re-presents the same rule set and severities as a general-purpose reference, independent of any particular fixture.

Apply these rules when writing, reviewing, or debugging axe-core scans.


Core Principle

Axe-core catches ~30–40% of WCAG issues automatically. It is the baseline, not the ceiling. Always pair automated scanning with manual keyboard and screen reader testing.

An axe-core result is evidence, not a conformance decision. Preserve the rule's raw outcome (violations, incomplete, passes, inapplicable) exactly as axe reports it — do not overwrite or discard it when converting to a project finding. Cite this file, AXE_RULES_REFERENCE.md, or the rule's own dequeuniversity.com/rules/axe/ page as the authority for a WCAG mapping; do not invent a mapping axe-core does not document for that rule. Record an unreviewed violations result as evidence_status: automated-indicator with handling: review — never as a confirmed standards failure — until a human confirms it. See Accessibility Finding Tracking: Policy Classification.

Key tags to include in scans:

typescript
.withTags(['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa'])

Axe-core 4.11 includes 100+ automated checks across these categories: WCAG 2.0 A/AA (68 rules), WCAG 2.1 A/AA (26 rules), WCAG 2.2 A/AA (1 rule, disabled by default), Best Practices (30+ rules), WCAG AAA (3 rules, disabled by default), Experimental (9 rules, disabled by default), and Deprecated (7 rules, disabled by default).


Severity Scale (axe-core)

axe severityMeaning
criticalBlocks access for one or more disability groups
seriousSignificantly impairs access
moderateCreates friction; workaround exists
minorBest-practice gap; marginal impact

Critical Rules — must never appear in production

Rule IDCategoryDescription
image-altText alternatives<img> missing alt attribute
area-altText alternativesImage map <area> missing alt text
input-image-altText alternatives<input type="image"> missing alt
video-captionText alternatives<video> without captions
aria-allowed-attrARIAElement has unsupported ARIA attributes for its role
aria-hidden-bodyARIAaria-hidden applied to <body>
aria-required-attrARIARequired ARIA attribute missing
aria-required-childrenARIARequired child ARIA roles missing
aria-required-parentARIARequired parent ARIA role missing
aria-rolesARIAInvalid ARIA role value
aria-valid-attrARIAInvalid ARIA attribute name
aria-valid-attr-valueARIAARIA attribute has invalid value
labelFormsForm input without associated <label>
select-nameForms<select> without accessible name
button-nameButtons/LinksButton without discernible text
input-button-nameButtons/Links<input type="button"> without text
duplicate-id-ariaStructureDuplicate id values referenced by ARIA
meta-refreshMeta<meta http-equiv="refresh"> causes timed redirect

Serious Rules — fix before release

Rule IDCategoryDescription
object-altText alternatives<object> without accessible text
svg-img-altText alternativesSVG with role="img" and no accessible name
role-img-altText alternativesElement with role="img" lacks alt text
aria-braille-equivalentARIABraille label without non-braille equivalent
aria-command-nameARIAButton, link, or menu item without accessible name
aria-conditional-attrARIAARIA attribute used contrary to role spec
aria-hidden-focusARIAaria-hidden element contains focusable content
aria-input-field-nameARIAARIA input field without accessible name
aria-meter-nameARIAARIA meter element without accessible name
aria-progressbar-nameARIAARIA progressbar element without accessible name
aria-prohibited-attrARIAProhibited ARIA attribute used
aria-toggle-field-nameARIAARIA toggle field without accessible name
aria-tooltip-nameARIAARIA tooltip without accessible name
aria-dialog-nameARIADialog without accessible name
aria-treeitem-nameARIATree item without accessible name
color-contrastColorText contrast below 4.5:1 (normal) or 3:1 (large)
frame-titleFrames<iframe> without accessible name
frame-title-uniqueFramesFrame titles are not unique
frame-focusable-contentFramesFrame with focusable content is tabindex="-1"
html-has-langLanguage<html> missing lang attribute
html-lang-validLanguagelang attribute has invalid BCP 47 value
valid-langLanguageInline lang value is invalid
document-titleLanguage<title> element missing
listStructure<ul>/<ol> contains elements other than <li>
listitemStructure<li> outside <ul> or <ol>
definition-listStructure<dl> contains elements other than <dt>/<dd>
dlitemStructure<dt>/<dd> outside <dl>
bypassKeyboardNo skip navigation mechanism present
scrollable-region-focusableKeyboardScrollable region not keyboard accessible
link-nameButtons/LinksLink without discernible text
link-in-text-blockButtons/LinksLink not distinguishable from surrounding text
avoid-inline-spacingContent sizingText spacing overrides not adjustable
autocomplete-validFormsautocomplete attribute invalid or missing
tabindexBest practicestabindex value > 0 used
label-title-onlyBest practicesForm field labeled only via title attribute
label-content-name-mismatchBest practices (experimental)Visible label text doesn't match accessible name
td-has-headerTables (experimental)Large table cells lack associated headers
table-fake-captionTables (experimental)Table caption not marked up with <caption>
p-as-headingBest practices (experimental)Paragraph styled to look like a heading

Moderate Rules — fix in near-term backlog

Rule IDCategoryDescription
heading-orderHeadingsHeading levels skipped (e.g., h1 → h3)
empty-headingHeadingsHeading has no discernible text
th-has-data-cellsTablesTable headers have no associated data cells
td-headers-attrTablesTable cells reference invalid header IDs
meta-viewportMetaViewport user-scalable=no disables zoom
html-xml-lang-mismatchLanguagelang and xml:lang attributes disagree
form-field-multiple-labelsFormsForm field has multiple conflicting labels
landmark-one-mainBest practicesPage has no <main> landmark
landmark-banner-is-top-levelBest practicesbanner landmark not at top level
landmark-contentinfo-is-top-levelBest practicescontentinfo landmark not at top level
landmark-main-is-top-levelBest practicesmain landmark not at top level
landmark-no-duplicate-bannerBest practicesMore than one banner landmark
landmark-no-duplicate-contentinfoBest practicesMore than one contentinfo landmark
landmark-no-duplicate-mainBest practicesMore than one main landmark
regionBest practicesContent exists outside landmark regions
page-has-heading-oneBest practicesPage has no <h1>
scope-attr-validBest practicesscope attribute has invalid value
accesskeysBest practicesaccesskey values are not unique

Minor Rules

Rule IDCategoryDescription
table-duplicate-nameTables<caption> text duplicates summary attribute
aria-deprecated-roleARIADeprecated ARIA role used
server-side-image-mapKeyboardServer-side image map used
aria-textARIA (best practice)role="text" on an element with focusable descendants

Disabled-by-default rules (deprecated marquee/blink/audio-caption) are not listed above — flag them if encountered, but they are not enabled in a default scan.

The three WCAG AAA rules axe-core disables by default report against a level the project's AA target does not require. If enabled and a project has not declared a broader target, classify a confirmed finding from one of these rules as obligation: aspirational, not advisory — it is still a real AAA-level finding, just not part of the AA baseline. Do not report satisfying one of these rules as WCAG AAA conformance.


Running axe-core in CI (Playwright)

typescript
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';

test('No WCAG 2.x AA violations', async ({ page }) => {
  await page.goto('/');
  const results = await new AxeBuilder({ page })
    .withTags(['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa'])
    .analyze();
  expect(results.violations).toEqual([]);
});

Common configuration options:

typescript
// Exclude a specific element (use sparingly — document the reason)
.exclude('#known-false-positive')

// Include only a specific element
.include('#component-under-test')

// Disable a specific rule (document the reason and JIRA/issue link)
.disableRules(['color-contrast'])

Definition of Done Checklist

  • axe-core scans run on every PR with wcag2a, wcag2aa, wcag21aa, wcag22aa tags
  • Zero critical violations in production code
  • Zero serious violations in production code (or explicit waiver with issue link)
  • All rule exclusions documented with reason and associated issue
  • Light and dark colour schemes both tested
  • Mobile viewport tested
  • axe results published as CI artifact for reference

Key WCAG Criteria (automation coverage)

  • 1.1.1 Non-text Content (A)
  • 1.3.1 Info and Relationships (A)
  • 1.4.3 Contrast Minimum (AA)
  • 2.4.2 Page Titled (A)
  • 3.1.1 Language of Page (A)
  • 4.1.2 Name, Role, Value (A)
  • 4.1.3 Status Messages (AA) — partial coverage

Automation covers ~30–40% of WCAG issues. Always pair with manual testing.


References

Standards horizon: These rules target WCAG 2.2 AA. Monitor: https://www.w3.org/TR/wcag-3.0/

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

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

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

Tải kỹ năng này khi cấu hình các lượt quét axe-core, xem xét kết quả kiểm thử khả năng truy cập tự động hoặc viết kiểm thử dùng @axe-core/playwright, @axe-core/react hay các tích hợp tương tự. Cung cấp tài liệu tra cứu nhanh về ID quy tắc axe 4.x, ánh xạ WCAG và mức độ nghiêm trọng mặc định.

Vì sao nên dùng Axe Rules 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. Axe Rules 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 Axe Rules trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/mgifford/accessibility-skills/tree/main/skills/axe-rules. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng 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 Axe Rules?

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.

Có thể dùng Axe Rules 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 Axe Rules 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 Axe Rules có miễn phí không?

Có. Kỹ năng này được mgifford phát hành trên GitHub theo giấy phép AGPL-3.0. 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 các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công 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à những tiêu chí mà kết quả cần đáp ứng. 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 👇