Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rule metadata tags normalised to match WCAG success criterion #1849

Merged
merged 1 commit into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
174 changes: 87 additions & 87 deletions doc/rule-descriptions.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/rules/area-alt.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"cat.text-alternatives",
"wcag2a",
"wcag111",
"wcag1.1.1",
"section508",
"section508.22.a"
],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-allowed-attr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-allowed-attr",
"matches": "aria-allowed-attr-matches.js",
"tags": ["cat.aria", "wcag2a", "wcag412"],
"tags": ["cat.aria", "wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures ARIA attributes are allowed for an element's role",
"help": "Elements must only use allowed ARIA attributes"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-dpub-role-fallback.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "aria-dpub-role-fallback",
"selector": "[role]",
"matches": "aria-dpub-role-fallback-matches.js",
"tags": ["cat.aria", "wcag2a", "wcag131"],
"tags": ["cat.aria", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures unsupported DPUB roles are only used on elements with implicit fallback roles",
"help": "Unsupported DPUB ARIA roles should be used on elements with implicit fallback roles"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-hidden-body.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "aria-hidden-body",
"selector": "body",
"excludeHidden": false,
"tags": ["cat.aria", "wcag2a", "wcag412"],
"tags": ["cat.aria", "wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures aria-hidden='true' is not present on the document body.",
"help": "aria-hidden='true' must not be present on the document body"
Expand Down
9 changes: 8 additions & 1 deletion lib/rules/aria-hidden-focus.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"selector": "[aria-hidden=\"true\"]",
"matches": "aria-hidden-focus-matches.js",
"excludeHidden": false,
"tags": ["cat.name-role-value", "wcag2a", "wcag412", "wcag131"],
"tags": [
"cat.name-role-value",
"wcag2a",
"wcag412",
"wcag4.1.2",
"wcag131",
"wcag1.3.1"
],
"metadata": {
"description": "Ensures aria-hidden elements do not contain focusable elements",
"help": "ARIA hidden element must not contain focusable elements"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-input-field-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "aria-input-field-name",
"selector": "[role=\"combobox\"], [role=\"listbox\"], [role=\"searchbox\"], [role=\"slider\"], [role=\"spinbutton\"], [role=\"textbox\"]",
"matches": "aria-form-field-name-matches.js",
"tags": ["wcag2a", "wcag412"],
"tags": ["wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures every ARIA input field has an accessible name",
"help": "ARIA input fields have an accessible name"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-required-attr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-required-attr",
"selector": "[role]",
"tags": ["cat.aria", "wcag2a", "wcag412"],
"tags": ["cat.aria", "wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures elements with ARIA roles have all required ARIA attributes",
"help": "Required ARIA attributes must be provided"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-required-children.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-required-children",
"selector": "[role]",
"tags": ["cat.aria", "wcag2a", "wcag131"],
"tags": ["cat.aria", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures elements with an ARIA role that require child roles contain them",
"help": "Certain ARIA roles must contain particular children"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-required-parent.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-required-parent",
"selector": "[role]",
"tags": ["cat.aria", "wcag2a", "wcag131"],
"tags": ["cat.aria", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures elements with an ARIA role that require parent roles are contained by them",
"help": "Certain ARIA roles must be contained by particular parents"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-roledescription.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-roledescription",
"selector": "[aria-roledescription]",
"tags": ["cat.aria", "wcag2a", "wcag412"],
"tags": ["cat.aria", "wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensure aria-roledescription is only used on elements with an implicit or explicit role",
"help": "Use aria-roledescription on elements with a semantic role"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-roles.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-roles",
"selector": "[role]",
"tags": ["cat.aria", "wcag2a", "wcag412"],
"tags": ["cat.aria", "wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures all elements with a role attribute use a valid value",
"help": "ARIA roles used must conform to valid values"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-toggle-field-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "aria-toggle-field-name",
"selector": "[role=\"checkbox\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"], [role=\"radio\"], [role=\"switch\"]",
"matches": "aria-form-field-name-matches.js",
"tags": ["wcag2a", "wcag412"],
"tags": ["wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures every ARIA toggle field has an accessible name",
"help": "ARIA toggle fields have an accessible name"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-valid-attr-value.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-valid-attr-value",
"matches": "aria-has-attr-matches.js",
"tags": ["cat.aria", "wcag2a", "wcag412"],
"tags": ["cat.aria", "wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures all ARIA attributes have valid values",
"help": "ARIA attributes must conform to valid values"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-valid-attr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "aria-valid-attr",
"matches": "aria-has-attr-matches.js",
"tags": ["cat.aria", "wcag2a", "wcag412"],
"tags": ["cat.aria", "wcag2a", "wcag412", "wcag4.1.2"],
"metadata": {
"description": "Ensures attributes that begin with aria- are valid ARIA attributes",
"help": "ARIA attributes must conform to valid names"
Expand Down
1 change: 1 addition & 0 deletions lib/rules/audio-caption.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"cat.time-and-media",
"wcag2a",
"wcag121",
"wcag1.2.1",
"section508",
"section508.22.a"
],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/autocomplete-valid.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "autocomplete-valid",
"matches": "autocomplete-matches.js",
"tags": ["cat.forms", "wcag21aa", "wcag135"],
"tags": ["cat.forms", "wcag21aa", "wcag135", "wcag1.3.5"],
"metadata": {
"description": "Ensure the autocomplete attribute is correct and suitable for the form field",
"help": "autocomplete attribute must be used correctly"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/avoid-inline-spacing.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "avoid-inline-spacing",
"selector": "[style]",
"tags": ["wcag21aa", "wcag1412"],
"tags": ["wcag21aa", "wcag1412", "wcag1.4.12"],
"metadata": {
"description": "Ensure that text spacing set through style attributes can be adjusted with custom stylesheets",
"help": "Inline text spacing must be adjustable with custom stylesheets"
Expand Down
1 change: 1 addition & 0 deletions lib/rules/blink.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"cat.time-and-media",
"wcag2a",
"wcag222",
"wcag2.2.2",
"section508",
"section508.22.j"
],
Expand Down
1 change: 1 addition & 0 deletions lib/rules/button-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"cat.name-role-value",
"wcag2a",
"wcag412",
"wcag4.1.2",
"section508",
"section508.22.a"
],
Expand Down
1 change: 1 addition & 0 deletions lib/rules/bypass.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"cat.keyboard",
"wcag2a",
"wcag241",
"wcag2.4.1",
"section508",
"section508.22.o"
],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/color-contrast.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"options": {
"noScroll": false
},
"tags": ["cat.color", "wcag2aa", "wcag143"],
"tags": ["cat.color", "wcag2aa", "wcag143", "wcag1.4.3"],
"metadata": {
"description": "Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds",
"help": "Elements must have sufficient color contrast"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/css-orientation-lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "css-orientation-lock",
"selector": "html",
"tags": ["cat.structure", "wcag134", "wcag21aa", "experimental"],
"tags": ["cat.structure", "wcag134", "wcag1.3.4", "wcag21aa", "experimental"],
"metadata": {
"description": "Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations",
"help": "CSS Media queries are not used to lock display orientation"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/definition-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "definition-list",
"selector": "dl",
"matches": "no-role-matches.js",
"tags": ["cat.structure", "wcag2a", "wcag131"],
"tags": ["cat.structure", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures <dl> elements are structured correctly",
"help": "<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script> or <template> elements"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/dlitem.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "dlitem",
"selector": "dd, dt",
"matches": "no-role-matches.js",
"tags": ["cat.structure", "wcag2a", "wcag131"],
"tags": ["cat.structure", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures <dt> and <dd> elements are contained by a <dl>",
"help": "<dt> and <dd> elements must be contained by a <dl>"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/document-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "document-title",
"selector": "html",
"matches": "window-is-top.js",
"tags": ["cat.text-alternatives", "wcag2a", "wcag242"],
"tags": ["cat.text-alternatives", "wcag2a", "wcag242", "wcag2.4.2"],
"metadata": {
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/duplicate-id-active.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"selector": "[id]",
"matches": "duplicate-id-active-matches.js",
"excludeHidden": false,
"tags": ["cat.parsing", "wcag2a", "wcag411"],
"tags": ["cat.parsing", "wcag2a", "wcag411", "wcag4.1.1"],
"metadata": {
"description": "Ensures every id attribute value of active elements is unique",
"help": "IDs of active elements must be unique"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/duplicate-id-aria.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"selector": "[id]",
"matches": "duplicate-id-aria-matches.js",
"excludeHidden": false,
"tags": ["cat.parsing", "wcag2a", "wcag411"],
"tags": ["cat.parsing", "wcag2a", "wcag411", "wcag4.1.1"],
"metadata": {
"description": "Ensures every id attribute value used in ARIA and in labels is unique",
"help": "IDs used in ARIA and labels must be unique"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/duplicate-id.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"selector": "[id]",
"matches": "duplicate-id-misc-matches.js",
"excludeHidden": false,
"tags": ["cat.parsing", "wcag2a", "wcag411"],
"tags": ["cat.parsing", "wcag2a", "wcag411", "wcag4.1.1"],
"metadata": {
"description": "Ensures every id attribute value is unique",
"help": "id attribute value must be unique"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/form-field-multiple-labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "form-field-multiple-labels",
"selector": "input, select, textarea",
"matches": "label-matches.js",
"tags": ["cat.forms", "wcag2a", "wcag332"],
"tags": ["cat.forms", "wcag2a", "wcag332", "wcag3.3.2"],
"metadata": {
"description": "Ensures form field does not have multiple label elements",
"help": "Form field should not have multiple label elements"
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/frame-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"cat.text-alternatives",
"wcag2a",
"wcag241",
"wcag2.4.1",
"wcag412",
"wcag4.1.2",
"section508",
"section508.22.i"
],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/html-has-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "html-has-lang",
"selector": "html",
"matches": "window-is-top.js",
"tags": ["cat.language", "wcag2a", "wcag311"],
"tags": ["cat.language", "wcag2a", "wcag311", "wcag3.1.1"],
"metadata": {
"description": "Ensures every HTML document has a lang attribute",
"help": "<html> element must have a lang attribute"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/html-lang-valid.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "html-lang-valid",
"selector": "html[lang], html[xml\\:lang]",
"tags": ["cat.language", "wcag2a", "wcag311"],
"tags": ["cat.language", "wcag2a", "wcag311", "wcag3.1.1"],
"metadata": {
"description": "Ensures the lang attribute of the <html> element has a valid value",
"help": "<html> element must have a valid value for the lang attribute"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/html-xml-lang-mismatch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "html-xml-lang-mismatch",
"selector": "html[lang][xml\\:lang]",
"matches": "xml-lang-mismatch-matches.js",
"tags": ["cat.language", "wcag2a", "wcag311"],
"tags": ["cat.language", "wcag2a", "wcag311", "wcag3.1.1"],
"metadata": {
"description": "Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page",
"help": "HTML elements with lang and xml:lang must have the same base language"
Expand Down
1 change: 1 addition & 0 deletions lib/rules/image-alt.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"cat.text-alternatives",
"wcag2a",
"wcag111",
"wcag1.1.1",
"section508",
"section508.22.a"
],
Expand Down
1 change: 1 addition & 0 deletions lib/rules/input-button-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"cat.name-role-value",
"wcag2a",
"wcag412",
"wcag4.1.2",
"section508",
"section508.22.a"
],
Expand Down
1 change: 1 addition & 0 deletions lib/rules/input-image-alt.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"cat.text-alternatives",
"wcag2a",
"wcag111",
"wcag1.1.1",
"section508",
"section508.22.a"
],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/label-content-name-mismatch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "label-content-name-mismatch",
"matches": "label-content-name-mismatch-matches.js",
"tags": ["wcag21a", "wcag253", "experimental"],
"tags": ["wcag21a", "wcag253", "wcag2.5.3", "experimental"],
"metadata": {
"description": "Ensures that elements labelled through their content must have their visible text as part of their accessible name",
"help": "Elements must have their visible text as part of their accessible name"
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/label.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"cat.forms",
"wcag2a",
"wcag332",
"wcag3.3.2",
"wcag131",
"wcag1.3.1",
"section508",
"section508.22.n"
],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/layout-table.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "layout-table",
"selector": "table",
"matches": "layout-table-matches.js",
"tags": ["cat.semantics", "wcag2a", "wcag131"],
"tags": ["cat.semantics", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures presentational <table> elements do not use <th>, <caption> elements or the summary attribute",
"help": "Layout tables must not use data table elements"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/link-in-text-block.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"selector": "a[href], [role=link]",
"matches": "link-in-text-block-matches.js",
"excludeHidden": false,
"tags": ["cat.color", "experimental", "wcag2a", "wcag141"],
"tags": ["cat.color", "experimental", "wcag2a", "wcag141", "wcag1.4.1"],
"metadata": {
"description": "Links can be distinguished without relying on color",
"help": "Links must be distinguished from surrounding text in a way that does not rely on color"
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/link-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"cat.name-role-value",
"wcag2a",
"wcag412",
"wcag4.1.2",
"wcag244",
"wcag2.4.4",
"section508",
"section508.22.a"
],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "list",
"selector": "ul, ol",
"matches": "no-role-matches.js",
"tags": ["cat.structure", "wcag2a", "wcag131"],
"tags": ["cat.structure", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures that lists are structured correctly",
"help": "<ul> and <ol> must only directly contain <li>, <script> or <template> elements"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/listitem.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "listitem",
"selector": "li",
"matches": "no-role-matches.js",
"tags": ["cat.structure", "wcag2a", "wcag131"],
"tags": ["cat.structure", "wcag2a", "wcag131", "wcag1.3.1"],
"metadata": {
"description": "Ensures <li> elements are used semantically",
"help": "<li> elements must be contained in a <ul> or <ol>"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/marquee.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "marquee",
"selector": "marquee",
"excludeHidden": false,
"tags": ["cat.parsing", "wcag2a", "wcag222"],
"tags": ["cat.parsing", "wcag2a", "wcag222", "wcag2.2.2"],
"metadata": {
"description": "Ensures <marquee> elements are not used",
"help": "<marquee> elements are deprecated and must not be used"
Expand Down