Skip to content

Commit

Permalink
Merge pull request #63 from browserstack/AXE-211_heading_order
Browse files Browse the repository at this point in the history
Axe 211 heading order
  • Loading branch information
mattscepter authored Jul 15, 2024
2 parents e8fb9e2 + 16d7ac2 commit eb92c37
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions doc/rule-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ Rules that do not necessarily conform to WCAG success criterion but are industry
| [empty-heading](https://dequeuniversity.com/rules/axe/4.9/empty-heading?application=RuleDescription) | Ensures headings have discernible text | Minor | cat.name-role-value, best-practice | failure, needs review | [ffd0e9](https://act-rules.github.io/rules/ffd0e9) |
| [empty-table-header](https://dequeuniversity.com/rules/axe/4.9/empty-table-header?application=RuleDescription) | Ensures table headers have discernible text | Minor | cat.name-role-value, best-practice | failure, needs review | |
| [frame-tested](https://dequeuniversity.com/rules/axe/4.9/frame-tested?application=RuleDescription) | Ensures <iframe> and <frame> elements contain the axe-core script | Critical | cat.structure, best-practice, review-item | failure, needs review | |
| [heading-order](https://dequeuniversity.com/rules/axe/4.9/heading-order?application=RuleDescription) | Ensures the order of headings is semantically correct | Moderate | cat.semantics, best-practice | failure, needs review | |
| [image-redundant-alt](https://dequeuniversity.com/rules/axe/4.9/image-redundant-alt?application=RuleDescription) | Ensure image alternative is not repeated as text | Minor | cat.text-alternatives, best-practice | failure | |
| [label-title-only](https://dequeuniversity.com/rules/axe/4.9/label-title-only?application=RuleDescription) | Ensures that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes | Serious | cat.forms, best-practice | failure | |
| [landmark-banner-is-top-level](https://dequeuniversity.com/rules/axe/4.9/landmark-banner-is-top-level?application=RuleDescription) | Ensures the banner landmark is at top level | Moderate | cat.semantics, best-practice | failure | |
Expand All @@ -129,11 +128,12 @@ Rules that do not necessarily conform to WCAG success criterion but are industry

Rules that check for conformance to WCAG AAA success criteria that can be fully automated. These are disabled by default in axe-core.

| Rule ID | Description | Impact | Tags | Issue Type | ACT Rules |
| :--------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | :------ | :--------------------------------------------- | :------------------------- | :------------------------------------------------- |
| [color-contrast-enhanced](https://dequeuniversity.com/rules/axe/4.9/color-contrast-enhanced?application=RuleDescription) | Ensures the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds | Serious | cat.color, wcag2aaa, wcag146, ACT | failure, needs review | [09o5cg](https://act-rules.github.io/rules/09o5cg) |
| [identical-links-same-purpose](https://dequeuniversity.com/rules/axe/4.9/identical-links-same-purpose?application=RuleDescription) | Ensure that links with the same accessible name serve a similar purpose | Minor | cat.semantics, wcag2aaa, wcag249 | needs review | [b20e66](https://act-rules.github.io/rules/b20e66) |
| [meta-refresh-no-exceptions](https://dequeuniversity.com/rules/axe/4.9/meta-refresh-no-exceptions?application=RuleDescription) | Ensures <meta http-equiv="refresh"> is not used for delayed refresh | Minor | cat.time-and-media, wcag2aaa, wcag224, wcag325 | failure | [bisz58](https://act-rules.github.io/rules/bisz58) |
| Rule ID | Description | Impact | Tags | Issue Type | ACT Rules |
| :--------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | :------- | :----------------------------------------------------------------------- | :------------------------- | :------------------------------------------------- |
| [color-contrast-enhanced](https://dequeuniversity.com/rules/axe/4.9/color-contrast-enhanced?application=RuleDescription) | Ensures the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds | Serious | cat.color, wcag2aaa, wcag146, ACT | failure, needs review | [09o5cg](https://act-rules.github.io/rules/09o5cg) |
| [heading-order](https://dequeuniversity.com/rules/axe/4.9/heading-order?application=RuleDescription) | Ensures the order of headings is semantically correct | Moderate | cat.semantics, wcag2aaa, wcag2410, a11y-engine, a11y-engine-experimental | failure, needs review | |
| [identical-links-same-purpose](https://dequeuniversity.com/rules/axe/4.9/identical-links-same-purpose?application=RuleDescription) | Ensure that links with the same accessible name serve a similar purpose | Minor | cat.semantics, wcag2aaa, wcag249 | needs review | [b20e66](https://act-rules.github.io/rules/b20e66) |
| [meta-refresh-no-exceptions](https://dequeuniversity.com/rules/axe/4.9/meta-refresh-no-exceptions?application=RuleDescription) | Ensures <meta http-equiv="refresh"> is not used for delayed refresh | Minor | cat.time-and-media, wcag2aaa, wcag224, wcag325 | failure | [bisz58](https://act-rules.github.io/rules/bisz58) |

## Experimental Rules

Expand Down
10 changes: 8 additions & 2 deletions lib/rules/heading-order.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
"impact": "moderate",
"selector": "h1, h2, h3, h4, h5, h6, [role=heading]",
"matches": "heading-matches",
"tags": ["cat.semantics", "best-practice"],
"tags": [
"cat.semantics",
"wcag2aaa",
"wcag2410",
"a11y-engine",
"a11y-engine-experimental"
],
"metadata": {
"description": "Ensures the order of headings is semantically correct",
"help": "Heading levels should only increase by one"
"help": "Heading levels must increase by one"
},
"all": [],
"any": ["heading-order"],
Expand Down

0 comments on commit eb92c37

Please sign in to comment.