Skip to content

Commit

Permalink
Merge branch 'develop' into autocomplete-valid-incompletes
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Jun 17, 2024
2 parents 8f1be34 + 50e7c23 commit 497a9a1
Show file tree
Hide file tree
Showing 62 changed files with 1,267 additions and 592 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ jobs:
paths:
- node_modules

# Build and cache axe.js
# Build and cache built files
build_unix:
<<: *defaults
<<: *unix_box
steps:
- checkout
- <<: *restore_dependency_cache_unix
- run: npm run prepare
- run: npm run build
- save_cache:
key: v9-cache-build-<< pipeline.git.revision >>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run prepare
- run: npm run build
- uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ typings/axe-core/axe-core-tests.js

# doc
doc/rule-descriptions.*.md

8 changes: 4 additions & 4 deletions doc/rule-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@

These rules are disabled by default, until WCAG 2.2 is more widely adopted and required.

| Rule ID | Description | Impact | Tags | Issue Type | ACT Rules |
| :----------------------------------------------------------------------------------------------- | :------------------------------------------------- | :------ | :--------------------------------------------- | :------------------------- | :-------- |
| [target-size](https://dequeuniversity.com/rules/axe/4.9/target-size?application=RuleDescription) | Ensure touch target have sufficient size and space | Serious | cat.sensory-and-visual-cues, wcag22aa, wcag258 | failure, needs&nbsp;review | |
| Rule ID | Description | Impact | Tags | Issue Type | ACT Rules |
| :----------------------------------------------------------------------------------------------- | :-------------------------------------------------- | :------ | :--------------------------------------------- | :------------------------- | :-------- |
| [target-size](https://dequeuniversity.com/rules/axe/4.9/target-size?application=RuleDescription) | Ensure touch targets have sufficient size and space | Serious | cat.sensory-and-visual-cues, wcag22aa, wcag258 | failure, needs&nbsp;review | |

## Best Practices Rules

Expand All @@ -115,7 +115,7 @@ Rules that do not necessarily conform to WCAG success criterion but are industry
| [landmark-no-duplicate-contentinfo](https://dequeuniversity.com/rules/axe/4.9/landmark-no-duplicate-contentinfo?application=RuleDescription) | Ensures the document has at most one contentinfo landmark | Moderate | cat.semantics, best-practice | failure | |
| [landmark-no-duplicate-main](https://dequeuniversity.com/rules/axe/4.9/landmark-no-duplicate-main?application=RuleDescription) | Ensures the document has at most one main landmark | Moderate | cat.semantics, best-practice | failure | |
| [landmark-one-main](https://dequeuniversity.com/rules/axe/4.9/landmark-one-main?application=RuleDescription) | Ensures the document has a main landmark | Moderate | cat.semantics, best-practice | failure | |
| [landmark-unique](https://dequeuniversity.com/rules/axe/4.9/landmark-unique?application=RuleDescription) | Landmarks should have a unique role or role/label/title (i.e. accessible name) combination | Moderate | cat.semantics, best-practice | failure | |
| [landmark-unique](https://dequeuniversity.com/rules/axe/4.9/landmark-unique?application=RuleDescription) | Ensures landmarks are unique | Moderate | cat.semantics, best-practice | failure | |
| [meta-viewport-large](https://dequeuniversity.com/rules/axe/4.9/meta-viewport-large?application=RuleDescription) | Ensures &lt;meta name=&quot;viewport&quot;&gt; can scale a significant amount | Minor | cat.sensory-and-visual-cues, best-practice | failure | |
| [page-has-heading-one](https://dequeuniversity.com/rules/axe/4.9/page-has-heading-one?application=RuleDescription) | Ensure that the page, or at least one of its frames contains a level-one heading | Moderate | cat.semantics, best-practice | failure | |
| [presentation-role-conflict](https://dequeuniversity.com/rules/axe/4.9/presentation-role-conflict?application=RuleDescription) | Elements marked as presentational should not have global ARIA or tabindex to ensure all screen readers ignore them | Minor | cat.aria, best-practice, ACT | failure | [46ca7f](https://act-rules.github.io/rules/46ca7f) |
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ module.exports = [
ignores: [
'**/node_modules/*',
'**/tmp/*',
'patches/*',
'build/tasks/aria-supported.js',
'doc/api/*',
'doc/examples/jest_react/*.js',
Expand Down
6 changes: 3 additions & 3 deletions lib/checks/aria/aria-errormessage.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"hidden": "aria-errormessage value `${data.values}` cannot reference a hidden element"
},
"incomplete": {
"singular": "ensure aria-errormessage value `${data.values}` references an existing element",
"plural": "ensure aria-errormessage values `${data.values}` reference existing elements",
"idrefs": "unable to determine if aria-errormessage element exists on the page: ${data.values}"
"singular": "Ensure aria-errormessage value `${data.values}` references an existing element",
"plural": "Ensure aria-errormessage values `${data.values}` reference existing elements",
"idrefs": "Unable to determine if aria-errormessage element exists on the page: ${data.values}"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/checks/forms/autocomplete-appropriate.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"impact": "serious",
"messages": {
"pass": "the autocomplete value is on an appropriate element",
"fail": "the autocomplete value is inappropriate for this type of input"
"pass": "The autocomplete value is on an appropriate element",
"fail": "The autocomplete value is inappropriate for this type of input"
}
}
}
2 changes: 1 addition & 1 deletion lib/checks/shared/aria-labelledby.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"messages": {
"pass": "aria-labelledby attribute exists and references elements that are visible to screen readers",
"fail": "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty",
"incomplete": "ensure aria-labelledby references an existing element"
"incomplete": "Ensure aria-labelledby references an existing element"
}
}
}
2 changes: 1 addition & 1 deletion lib/checks/shared/presentational-role.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"metadata": {
"impact": "minor",
"messages": {
"pass": "Element's default semantics were overriden with role=\"${data.role}\"",
"pass": "Element's default semantics were overridden with role=\"${data.role}\"",
"fail": {
"default": "Element's default semantics were not overridden with role=\"none\" or role=\"presentation\"",
"globalAria": "Element's role is not presentational because it has a global ARIA attribute",
Expand Down
2 changes: 1 addition & 1 deletion lib/checks/shared/role-none.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"metadata": {
"impact": "minor",
"messages": {
"pass": "Element's default semantics were overriden with role=\"none\"",
"pass": "Element's default semantics were overridden with role=\"none\"",
"fail": "Element's default semantics were not overridden with role=\"none\""
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/checks/shared/role-presentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"metadata": {
"impact": "minor",
"messages": {
"pass": "Element's default semantics were overriden with role=\"presentation\"",
"pass": "Element's default semantics were overridden with role=\"presentation\"",
"fail": "Element's default semantics were not overridden with role=\"presentation\""
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/data-table-large-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isDataTable, toArray } from '../commons/table';

function dataTableLargeMatches(node) {
if (isDataTable(node)) {
var tableArray = toArray(node);
const tableArray = toArray(node);
return (
tableArray.length >= 3 &&
tableArray[0].length >= 3 &&
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/frame-title-has-text-matches.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sanitize } from '../commons/text';

function frameTitleHasTextMatches(node) {
var title = node.getAttribute('title');
const title = node.getAttribute('title');
return !!sanitize(title);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/label-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function labelMatches(node, virtualNode) {
return true;
}

var type = virtualNode.attr('type').toLowerCase();
const type = virtualNode.attr('type').toLowerCase();
return (
['hidden', 'image', 'button', 'submit', 'reset'].includes(type) === false
);
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/landmark-unique.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"selector": "[role=banner], [role=complementary], [role=contentinfo], [role=main], [role=navigation], [role=region], [role=search], [role=form], form, footer, header, aside, main, nav, section",
"tags": ["cat.semantics", "best-practice"],
"metadata": {
"help": "Ensures landmarks are unique",
"description": "Landmarks should have a unique role or role/label/title (i.e. accessible name) combination"
"description": "Ensures landmarks are unique",
"help": "Landmarks should have a unique role or role/label/title (i.e. accessible name) combination"
},
"matches": "landmark-unique-matches",
"all": [],
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/link-in-text-block-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { sanitize } from '../commons/text';
import { isVisibleOnScreen, isInTextBlock } from '../commons/dom';

function linkInTextBlockMatches(node) {
var text = sanitize(node.innerText);
var role = node.getAttribute('role');
const text = sanitize(node.innerText);
const role = node.getAttribute('role');

if (role && role !== 'link') {
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/table-duplicate-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tags": ["cat.tables", "best-practice"],
"metadata": {
"description": "Ensure the <caption> element does not contain the same text as the summary attribute",
"help": "tables should not have the same summary and caption"
"help": "Tables should not have the same summary and caption"
},
"all": [],
"any": [],
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/target-size.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"matches": "widget-not-inline-matches",
"tags": ["cat.sensory-and-visual-cues", "wcag22aa", "wcag258"],
"metadata": {
"description": "Ensure touch target have sufficient size and space",
"description": "Ensure touch targets have sufficient size and space",
"help": "All touch targets must be 24px large, or leave sufficient space"
},
"all": [],
Expand Down
26 changes: 13 additions & 13 deletions locales/_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@
"help": "Document should have one main landmark"
},
"landmark-unique": {
"help": "Ensures landmarks are unique",
"description": "Landmarks should have a unique role or role/label/title (i.e. accessible name) combination"
"description": "Ensures landmarks are unique",
"help": "Landmarks should have a unique role or role/label/title (i.e. accessible name) combination"
},
"link-in-text-block": {
"description": "Ensure links are distinguished from surrounding text in a way that does not rely on color",
Expand Down Expand Up @@ -383,14 +383,14 @@
},
"table-duplicate-name": {
"description": "Ensure the <caption> element does not contain the same text as the summary attribute",
"help": "tables should not have the same summary and caption"
"help": "Tables should not have the same summary and caption"
},
"table-fake-caption": {
"description": "Ensure that tables with a caption use the <caption> element.",
"help": "Data or header cells must not be used to give caption to a data table."
},
"target-size": {
"description": "Ensure touch target have sufficient size and space",
"description": "Ensure touch targets have sufficient size and space",
"help": "All touch targets must be 24px large, or leave sufficient space"
},
"td-has-header": {
Expand Down Expand Up @@ -461,9 +461,9 @@
"hidden": "aria-errormessage value `${data.values}` cannot reference a hidden element"
},
"incomplete": {
"singular": "ensure aria-errormessage value `${data.values}` references an existing element",
"plural": "ensure aria-errormessage values `${data.values}` reference existing elements",
"idrefs": "unable to determine if aria-errormessage element exists on the page: ${data.values}"
"singular": "Ensure aria-errormessage value `${data.values}` references an existing element",
"plural": "Ensure aria-errormessage values `${data.values}` reference existing elements",
"idrefs": "Unable to determine if aria-errormessage element exists on the page: ${data.values}"
}
},
"aria-hidden-body": {
Expand Down Expand Up @@ -678,8 +678,8 @@
}
},
"autocomplete-appropriate": {
"pass": "the autocomplete value is on an appropriate element",
"fail": "the autocomplete value is inappropriate for this type of input"
"pass": "The autocomplete value is on an appropriate element",
"fail": "The autocomplete value is inappropriate for this type of input"
},
"autocomplete-valid": {
"pass": "the autocomplete attribute is correctly formatted",
Expand Down Expand Up @@ -962,7 +962,7 @@
"aria-labelledby": {
"pass": "aria-labelledby attribute exists and references elements that are visible to screen readers",
"fail": "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty",
"incomplete": "ensure aria-labelledby references an existing element"
"incomplete": "Ensure aria-labelledby references an existing element"
},
"avoid-inline-spacing": {
"pass": "No inline styles with '!important' that affect text spacing has been specified",
Expand Down Expand Up @@ -1045,7 +1045,7 @@
}
},
"presentational-role": {
"pass": "Element's default semantics were overriden with role=\"${data.role}\"",
"pass": "Element's default semantics were overridden with role=\"${data.role}\"",
"fail": {
"default": "Element's default semantics were not overridden with role=\"none\" or role=\"presentation\"",
"globalAria": "Element's role is not presentational because it has a global ARIA attribute",
Expand All @@ -1055,11 +1055,11 @@
}
},
"role-none": {
"pass": "Element's default semantics were overriden with role=\"none\"",
"pass": "Element's default semantics were overridden with role=\"none\"",
"fail": "Element's default semantics were not overridden with role=\"none\""
},
"role-presentation": {
"pass": "Element's default semantics were overriden with role=\"presentation\"",
"pass": "Element's default semantics were overridden with role=\"presentation\"",
"fail": "Element's default semantics were not overridden with role=\"presentation\""
},
"svg-non-empty-title": {
Expand Down
Loading

0 comments on commit 497a9a1

Please sign in to comment.