From d61e67dcd8e91d3da600c70b801fe80129342484 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Mon, 12 Mar 2018 11:22:24 +0100 Subject: [PATCH] fix: Ensure all rules have a category tag --- doc/rule-descriptions.md | 18 +++++++++--------- lib/rules/focus-order-semantics.json | 6 +++++- lib/rules/frame-tested.json | 5 ++--- lib/rules/hidden-content.json | 1 + lib/rules/landmark-banner-is-top-level.json | 1 + .../landmark-contentinfo-is-top-level.json | 1 + lib/rules/landmark-main-is-top-level.json | 3 ++- lib/rules/landmark-no-duplicate-banner.json | 1 + .../landmark-no-duplicate-contentinfo.json | 1 + lib/rules/landmark-one-main.json | 1 + lib/rules/page-has-heading-one.json | 1 + 11 files changed, 25 insertions(+), 14 deletions(-) diff --git a/doc/rule-descriptions.md b/doc/rule-descriptions.md index 58dbee3d50..a0df1e7d8f 100644 --- a/doc/rule-descriptions.md +++ b/doc/rule-descriptions.md @@ -23,11 +23,11 @@ | 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 | @@ -35,12 +35,12 @@ | 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 | @@ -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 | diff --git a/lib/rules/focus-order-semantics.json b/lib/rules/focus-order-semantics.json index 385aeba536..21c5d27777 100644 --- a/lib/rules/focus-order-semantics.json +++ b/lib/rules/focus-order-semantics.json @@ -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" diff --git a/lib/rules/frame-tested.json b/lib/rules/frame-tested.json index 6770571725..2deba87547 100644 --- a/lib/rules/frame-tested.json +++ b/lib/rules/frame-tested.json @@ -2,9 +2,8 @@ "id": "frame-tested", "selector": "frame, iframe", "tags": [ - "wcag2a", - "wcag2aa", - "best-practice" + "cat.structure", + "review-item" ], "metadata": { "description": "Ensures