Skip to content

Commit

Permalink
fix: Ensure all rules have a category tag
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoFiers committed Mar 12, 2018
1 parent 22607b6 commit d61e67d
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 14 deletions.
18 changes: 9 additions & 9 deletions doc/rule-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
| duplicate-id | Ensures every id attribute value is unique | cat.parsing, wcag2a, wcag411 | true |
| empty-heading | Ensures headings have discernible text | cat.name-role-value, best-practice | true |
| focus-order-semantics | Ensures elements in the focus order have an appropriate role | cat.keyboard, best-practice, experimental | true |
| frame-tested | Ensures <iframe> and <frame> elements contain the axe-core script | wcag2a, wcag2aa, best-practice | true |
| frame-tested | Ensures <iframe> and <frame> elements contain the axe-core script | cat.structure, review-item | true |
| frame-title-unique | Ensures <iframe> and <frame> elements contain a unique title attribute | cat.text-alternatives, best-practice | true |
| frame-title | Ensures <iframe> and <frame> elements contain a non-empty title attribute | cat.text-alternatives, wcag2a, wcag241, section508, section508.22.i | true |
| heading-order | Ensures the order of headings is semantically correct | cat.semantics, best-practice | true |
| hidden-content | Informs users about hidden content. | experimental, review-item | true |
| hidden-content | Informs users about hidden content. | cat.structure, experimental, review-item | true |
| html-has-lang | Ensures every HTML document has a lang attribute | cat.language, wcag2a, wcag311 | true |
| html-lang-valid | Ensures the lang attribute of the <html> element has a valid value | cat.language, wcag2a, wcag311 | true |
| image-alt | Ensures <img> elements have alternate text or a role of none or presentation | cat.text-alternatives, wcag2a, wcag111, section508, section508.22.a | true |
| image-redundant-alt | Ensure button and link text is not repeated as image alternative | cat.text-alternatives, best-practice | true |
| input-image-alt | Ensures <input type="image"> elements have alternate text | cat.text-alternatives, wcag2a, wcag111, section508, section508.22.a | true |
| label-title-only | Ensures that every form element is not solely labeled using the title or aria-describedby attributes | cat.forms, best-practice | true |
| label | Ensures every form element has a label | cat.forms, wcag2a, wcag332, wcag131, section508, section508.22.n | true |
| landmark-banner-is-top-level | The banner landmark should not be contained in another landmark | best-practice | true |
| landmark-contentinfo-is-top-level | The contentinfo landmark should not be contained in another landmark | best-practice | true |
| landmark-main-is-top-level | The main landmark should not be contained in another landmark | best-practice | true |
| landmark-no-duplicate-banner | Ensures the document has no more than one banner landmark | best-practice | true |
| landmark-no-duplicate-contentinfo | Ensures the document has no more than one contentinfo landmark | best-practice | true |
| landmark-one-main | Ensures a navigation point to the primary content of the page. If the page contains iframes, each iframe should contain either no main landmarks or just one | best-practice | true |
| landmark-banner-is-top-level | The banner landmark should not be contained in another landmark | cat.semantics, best-practice | true |
| landmark-contentinfo-is-top-level | The contentinfo landmark should not be contained in another landmark | cat.semantics, best-practice | true |
| landmark-main-is-top-level | The main landmark should not be contained in another landmark | cat.semantics, best-practice | true |
| landmark-no-duplicate-banner | Ensures the document has no more than one banner landmark | cat.semantics, best-practice | true |
| landmark-no-duplicate-contentinfo | Ensures the document has no more than one contentinfo landmark | cat.semantics, best-practice | true |
| landmark-one-main | Ensures a navigation point to the primary content of the page. If the page contains iframes, each iframe should contain either no main landmarks or just one | cat.semantics, best-practice | true |
| layout-table | Ensures presentational <table> elements do not use <th>, <caption> elements or the summary attribute | cat.semantics, wcag2a, wcag131 | true |
| link-in-text-block | Links can be distinguished without relying on color | cat.color, experimental, wcag2a, wcag141 | true |
| link-name | Ensures links have discernible text | cat.name-role-value, wcag2a, wcag111, wcag412, wcag244, section508, section508.22.a | true |
Expand All @@ -52,7 +52,7 @@
| meta-viewport | Ensures <meta name="viewport"> does not disable text scaling and zooming | cat.sensory-and-visual-cues, wcag2aa, wcag144 | true |
| object-alt | Ensures <object> elements have alternate text | cat.text-alternatives, wcag2a, wcag111, section508, section508.22.a | true |
| p-as-heading | Ensure p elements are not used to style headings | cat.semantics, wcag2a, wcag131, experimental | true |
| page-has-heading-one | Ensure that the page, or at least one of its frames contains a level-one heading | best-practice | true |
| page-has-heading-one | Ensure that the page, or at least one of its frames contains a level-one heading | cat.semantics, best-practice | true |
| radiogroup | Ensures related <input type="radio"> elements have a group and that the group designation is consistent | cat.forms, best-practice | true |
| region | Ensures all content is contained within a landmark region | cat.keyboard, best-practice | true |
| scope-attr-valid | Ensures the scope attribute is used correctly on tables | cat.tables, best-practice | true |
Expand Down
6 changes: 5 additions & 1 deletion lib/rules/focus-order-semantics.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"id": "focus-order-semantics",
"selector": "div, h1, h2, h3, h4, h5, h6, [role=heading], p, span",
"matches": "inserted-into-focus-order-matches.js",
"tags": ["cat.keyboard", "best-practice", "experimental"],
"tags": [
"cat.keyboard",
"best-practice",
"experimental"
],
"metadata": {
"description": "Ensures elements in the focus order have an appropriate role",
"help": "Elements in the focus order need a role appropriate for interactive content"
Expand Down
5 changes: 2 additions & 3 deletions lib/rules/frame-tested.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"id": "frame-tested",
"selector": "frame, iframe",
"tags": [
"wcag2a",
"wcag2aa",
"best-practice"
"cat.structure",
"review-item"
],
"metadata": {
"description": "Ensures <iframe> and <frame> elements contain the axe-core script",
Expand Down
1 change: 1 addition & 0 deletions lib/rules/hidden-content.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"selector": "*",
"excludeHidden": false,
"tags": [
"cat.structure",
"experimental",
"review-item"
],
Expand Down
1 change: 1 addition & 0 deletions lib/rules/landmark-banner-is-top-level.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"selector": "header:not([role]), [role=banner]",
"matches": "landmark-has-body-context.js",
"tags": [
"cat.semantics",
"best-practice"
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions lib/rules/landmark-contentinfo-is-top-level.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"selector": "footer:not([role]), [role=contentinfo]",
"matches": "landmark-has-body-context.js",
"tags": [
"cat.semantics",
"best-practice"
],
"metadata": {
Expand Down
3 changes: 2 additions & 1 deletion lib/rules/landmark-main-is-top-level.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"id": "landmark-main-is-top-level",
"selector": "main:not([role]), [role=main]",
"tags": [
"best-practice"
"cat.semantics",
"best-practice"
],
"metadata": {
"description": "The main landmark should not be contained in another landmark",
Expand Down
1 change: 1 addition & 0 deletions lib/rules/landmark-no-duplicate-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"id": "landmark-no-duplicate-banner",
"selector": "html",
"tags": [
"cat.semantics",
"best-practice"
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions lib/rules/landmark-no-duplicate-contentinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"id": "landmark-no-duplicate-contentinfo",
"selector": "html",
"tags": [
"cat.semantics",
"best-practice"
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions lib/rules/landmark-one-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"id": "landmark-one-main",
"selector": "html",
"tags": [
"cat.semantics",
"best-practice"
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions lib/rules/page-has-heading-one.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"id": "page-has-heading-one",
"selector": "html",
"tags": [
"cat.semantics",
"best-practice"
],
"metadata": {
Expand Down

0 comments on commit d61e67d

Please sign in to comment.