Skip to content

Commit

Permalink
chore(text): standardize rule descriptions (#4527)
Browse files Browse the repository at this point in the history
Currently, English-language rule descriptions begin with either `Ensure`
or `Ensures`. This PR standardizes the descriptions to the imperative
`Ensure`, as described here:
#4385

Closes: #4385
  • Loading branch information
marktnoonan committed Jul 8, 2024
1 parent 135898b commit be406d4
Show file tree
Hide file tree
Showing 88 changed files with 279 additions and 279 deletions.
4 changes: 2 additions & 2 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ In this example, we pass in the WCAG 2 A and AA tags into `axe.getRules` to retr
```js
[
{
description: "Ensures <area> elements of image maps have alternate text",
description: "Ensure <area> elements of image maps have alternate text",
help: "Active <area> elements must have alternate text",
helpUrl: "https://dequeuniversity.com/rules/axe/3.5/area-alt?application=axeAPI",
ruleId: "area-alt",
Expand All @@ -162,7 +162,7 @@ In this example, we pass in the WCAG 2 A and AA tags into `axe.getRules` to retr
actIds: ['c487ae']
},
{
description: "Ensures ARIA attributes are allowed for an element's role",
description: "Ensure ARIA attributes are allowed for an element's role",
help: "Elements must only use allowed ARIA attributes",
helpUrl: "https://dequeuniversity.com/rules/axe/3.5/aria-allowed-attr?application=axeAPI",
ruleId: "aria-allowed-attr",
Expand Down
216 changes: 108 additions & 108 deletions doc/rule-descriptions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/rule-proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ All Github issues that propose a rule must be tagged as _rule_, and must use the

In one sentence, describe what the rule does.

Example: "Ensures ARIA attributes are allowed for an element's role"\
Example: "Ensure ARIA attributes are allowed for an element's role"

#### Rule help

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/accesskeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"excludeHidden": false,
"tags": ["cat.keyboard", "best-practice"],
"metadata": {
"description": "Ensures every accesskey attribute value is unique",
"description": "Ensure every accesskey attribute value is unique",
"help": "accesskey attribute value should be unique"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/area-alt.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"actIds": ["c487ae"],
"metadata": {
"description": "Ensures <area> elements of image maps have alternate text",
"description": "Ensure <area> elements of image maps have alternate text",
"help": "Active <area> elements must have alternate text"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-allowed-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["5c01ea"],
"metadata": {
"description": "Ensures an element's role supports its ARIA attributes",
"description": "Ensure an element's role supports its ARIA attributes",
"help": "Elements must only use supported ARIA attributes"
},
"all": ["aria-allowed-attr"],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-allowed-role.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"matches": "aria-allowed-role-matches",
"tags": ["cat.aria", "best-practice"],
"metadata": {
"description": "Ensures role attribute has an appropriate value for the element",
"description": "Ensure role attribute has an appropriate value for the element",
"help": "ARIA role should be appropriate for the element"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-command-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"actIds": ["97a4e1"],
"metadata": {
"description": "Ensures every ARIA button, link and menuitem has an accessible name",
"description": "Ensure every ARIA button, link and menuitem has an accessible name",
"help": "ARIA commands must have an accessible name"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-conditional-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["5c01ea"],
"metadata": {
"description": "Ensures ARIA attributes are used as described in the specification of the element's role",
"description": "Ensure ARIA attributes are used as described in the specification of the element's role",
"help": "ARIA attributes must be used as specified for the element's role"
},
"all": ["aria-conditional-attr"],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-deprecated-role.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["674b10"],
"metadata": {
"description": "Ensures elements do not use deprecated roles",
"description": "Ensure elements do not use deprecated roles",
"help": "Deprecated ARIA roles must not be used"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-dialog-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"matches": "no-naming-method-matches",
"tags": ["cat.aria", "best-practice"],
"metadata": {
"description": "Ensures every ARIA dialog and alertdialog node has an accessible name",
"description": "Ensure every ARIA dialog and alertdialog node has an accessible name",
"help": "ARIA dialog and alertdialog nodes should have an accessible name"
},
"all": [],
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 @@ -14,7 +14,7 @@
"EN-9.4.1.2"
],
"metadata": {
"description": "Ensures aria-hidden=\"true\" is not present on the document body.",
"description": "Ensure aria-hidden=\"true\" is not present on the document body.",
"help": "aria-hidden=\"true\" must not be present on the document body"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-hidden-focus.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"actIds": ["6cfa84"],
"metadata": {
"description": "Ensures aria-hidden elements are not focusable nor contain focusable elements",
"description": "Ensure aria-hidden elements are not focusable nor contain focusable elements",
"help": "ARIA hidden element must not be focusable or contain focusable elements"
},
"all": [
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 @@ -15,7 +15,7 @@
],
"actIds": ["e086e5"],
"metadata": {
"description": "Ensures every ARIA input field has an accessible name",
"description": "Ensure every ARIA input field has an accessible name",
"help": "ARIA input fields must have an accessible name"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-meter-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"matches": "no-naming-method-matches",
"tags": ["cat.aria", "wcag2a", "wcag111", "EN-301-549", "EN-9.1.1.1"],
"metadata": {
"description": "Ensures every ARIA meter node has an accessible name",
"description": "Ensure every ARIA meter node has an accessible name",
"help": "ARIA meter nodes must have an accessible name"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-progressbar-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"matches": "no-naming-method-matches",
"tags": ["cat.aria", "wcag2a", "wcag111", "EN-301-549", "EN-9.1.1.1"],
"metadata": {
"description": "Ensures every ARIA progressbar node has an accessible name",
"description": "Ensure every ARIA progressbar node has an accessible name",
"help": "ARIA progressbar nodes must have an accessible name"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-prohibited-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["5c01ea"],
"metadata": {
"description": "Ensures ARIA attributes are not prohibited for an element's role",
"description": "Ensure ARIA attributes are not prohibited for an element's role",
"help": "Elements must only use permitted ARIA attributes"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-required-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["4e8ab6"],
"metadata": {
"description": "Ensures elements with ARIA roles have all required ARIA attributes",
"description": "Ensure elements with ARIA roles have all required ARIA attributes",
"help": "Required ARIA attributes must be provided"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-required-children.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["cat.aria", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"actIds": ["bc4a75", "ff89c9"],
"metadata": {
"description": "Ensures elements with an ARIA role that require child roles contain them",
"description": "Ensure elements with an ARIA role that require child roles contain them",
"help": "Certain ARIA roles must contain particular children"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-required-parent.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["cat.aria", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"actIds": ["ff89c9"],
"metadata": {
"description": "Ensures elements with an ARIA role that require parent roles are contained by them",
"description": "Ensure elements with an ARIA role that require parent roles are contained by them",
"help": "Certain ARIA roles must be contained by particular parents"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["674b10"],
"metadata": {
"description": "Ensures all elements with a role attribute use a valid value",
"description": "Ensure all elements with a role attribute use a valid value",
"help": "ARIA roles used must conform to valid values"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-text.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"selector": "[role=text]",
"tags": ["cat.aria", "best-practice"],
"metadata": {
"description": "Ensures role=\"text\" is used on elements with no focusable descendants",
"description": "Ensure role=\"text\" is used on elements with no focusable descendants",
"help": "\"role=text\" should have no focusable descendants"
},
"all": [],
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 @@ -15,7 +15,7 @@
],
"actIds": ["e086e5"],
"metadata": {
"description": "Ensures every ARIA toggle field has an accessible name",
"description": "Ensure every ARIA toggle field has an accessible name",
"help": "ARIA toggle fields must have an accessible name"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-tooltip-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"matches": "no-naming-method-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"metadata": {
"description": "Ensures every ARIA tooltip node has an accessible name",
"description": "Ensure every ARIA tooltip node has an accessible name",
"help": "ARIA tooltip nodes must have an accessible name"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-treeitem-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"matches": "no-naming-method-matches",
"tags": ["cat.aria", "best-practice"],
"metadata": {
"description": "Ensures every ARIA treeitem node has an accessible name",
"description": "Ensure every ARIA treeitem node has an accessible name",
"help": "ARIA treeitem nodes should have an accessible name"
},
"all": [],
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
Expand Up @@ -5,7 +5,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["6a7281"],
"metadata": {
"description": "Ensures all ARIA attributes have valid values",
"description": "Ensure all ARIA attributes have valid values",
"help": "ARIA attributes must conform to valid values"
},
"all": ["aria-valid-attr-value", "aria-errormessage", "aria-level"],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/aria-valid-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"actIds": ["5f99a7"],
"metadata": {
"description": "Ensures attributes that begin with aria- are valid ARIA attributes",
"description": "Ensure attributes that begin with aria- are valid ARIA attributes",
"help": "ARIA attributes must conform to valid names"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/audio-caption.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"actIds": ["2eb176", "afb423"],
"metadata": {
"description": "Ensures <audio> elements have captions",
"description": "Ensure <audio> elements have captions",
"help": "<audio> elements must have a captions track"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/blink.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"EN-9.2.2.2"
],
"metadata": {
"description": "Ensures <blink> elements are not used",
"description": "Ensure <blink> elements are not used",
"help": "<blink> elements are deprecated and must not be used"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/button-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"actIds": ["97a4e1", "m6b1q3"],
"metadata": {
"description": "Ensures buttons have discernible text",
"description": "Ensure buttons have discernible text",
"help": "Buttons must have discernible text"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/bypass.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"actIds": ["cf77f2", "047fe0", "b40fd1", "3e12e1", "ye5d6e"],
"metadata": {
"description": "Ensures each page has at least one mechanism for a user to bypass navigation and jump straight to the content",
"description": "Ensure each page has at least one mechanism for a user to bypass navigation and jump straight to the content",
"help": "Page must have means to bypass repeated blocks"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/color-contrast-enhanced.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"tags": ["cat.color", "wcag2aaa", "wcag146", "ACT"],
"actIds": ["09o5cg"],
"metadata": {
"description": "Ensures the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds",
"description": "Ensure the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds",
"help": "Elements must meet enhanced color contrast ratio thresholds"
},
"all": [],
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 @@ -15,7 +15,7 @@
],
"actIds": ["afw4f7", "09o5cg"],
"metadata": {
"description": "Ensures the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds",
"description": "Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds",
"help": "Elements must meet minimum color contrast ratio thresholds"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/css-orientation-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"actIds": ["b33eff"],
"metadata": {
"description": "Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations",
"description": "Ensure content is not locked to any specific display orientation, and the content is operable in all display orientations",
"help": "CSS Media queries must not lock display orientation"
},
"all": ["css-orientation-lock"],
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 @@ -5,7 +5,7 @@
"matches": "no-role-matches",
"tags": ["cat.structure", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"metadata": {
"description": "Ensures <dl> elements are structured correctly",
"description": "Ensure <dl> elements are structured correctly",
"help": "<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/dlitem.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"matches": "no-role-matches",
"tags": ["cat.structure", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"metadata": {
"description": "Ensures <dt> and <dd> elements are contained by a <dl>",
"description": "Ensure <dt> and <dd> elements are contained by a <dl>",
"help": "<dt> and <dd> elements must be contained by a <dl>"
},
"all": [],
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 @@ -15,7 +15,7 @@
],
"actIds": ["2779a5"],
"metadata": {
"description": "Ensures each HTML document contains a non-empty <title> element",
"description": "Ensure each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation"
},
"all": [],
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 @@ -8,7 +8,7 @@
"enabled": false,
"actIds": ["3ea0c8"],
"metadata": {
"description": "Ensures every id attribute value of active elements is unique",
"description": "Ensure every id attribute value of active elements is unique",
"help": "IDs of active elements must be unique"
},
"all": [],
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 @@ -8,7 +8,7 @@
"reviewOnFail": true,
"actIds": ["3ea0c8"],
"metadata": {
"description": "Ensures every id attribute value used in ARIA and in labels is unique",
"description": "Ensure every id attribute value used in ARIA and in labels is unique",
"help": "IDs used in ARIA and labels must be unique"
},
"all": [],
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 @@ -8,7 +8,7 @@
"enabled": false,
"actIds": ["3ea0c8"],
"metadata": {
"description": "Ensures every id attribute value is unique",
"description": "Ensure every id attribute value is unique",
"help": "id attribute value must be unique"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/empty-heading.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["cat.name-role-value", "best-practice"],
"actIds": ["ffd0e9"],
"metadata": {
"description": "Ensures headings have discernible text",
"description": "Ensure headings have discernible text",
"help": "Headings should not be empty"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/empty-table-header.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"selector": "th:not([role]), [role=\"rowheader\"], [role=\"columnheader\"]",
"tags": ["cat.name-role-value", "best-practice"],
"metadata": {
"description": "Ensures table headers have discernible text",
"description": "Ensure table headers have discernible text",
"help": "Table header text should not be empty"
},
"all": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/focus-order-semantics.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"matches": "inserted-into-focus-order-matches",
"tags": ["cat.keyboard", "best-practice", "experimental"],
"metadata": {
"description": "Ensures elements in the focus order have a role appropriate for interactive content",
"description": "Ensure elements in the focus order have a role appropriate for interactive content",
"help": "Elements in the focus order should have an appropriate role"
},
"all": [],
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 @@ -13,7 +13,7 @@
"EN-9.3.3.2"
],
"metadata": {
"description": "Ensures form field does not have multiple label elements",
"description": "Ensure form field does not have multiple label elements",
"help": "Form field must not have multiple label elements"
},
"all": [],
Expand Down
Loading

0 comments on commit be406d4

Please sign in to comment.