Skip to content

Commit c49c8ea

Browse files
authored
chore(release): v4.10.0 (#4545)
## [4.10.0](v4.9.1...v4.10.0) (2024-07-29) ### Features - **new-rule:** summary elements must have an accessible name ([#4511](#4511)) ([0d8a99e](0d8a99e)), closes [#4510](#4510) ### Bug Fixes - **all-rules:** fix flakey all-rules firefox test ([#4467](#4467)) ([3f13aa1](3f13aa1)) - **aria-allowed-attr:** allow aria-multiline=false for element with contenteditable ([#4537](#4537)) ([f019068](f019068)) - **aria-allowed-attr:** allow aria-required=false when normally not allowed ([#4532](#4532)) ([2e242e1](2e242e1)) - **aria-prohibited-attr:** allow aria-label/ledby on decendants of widget ([#4541](#4541)) ([07c5d91](07c5d91)) - **aria-roledescription:** keep disabled with { runOnly: 'wcag2a' } ([#4526](#4526)) ([5b4cb9d](5b4cb9d)), closes [#4523](#4523) - **autocomplete-valid:** incomplete for invalid but safe values ([#4500](#4500)) ([e31a974](e31a974)), closes [#4492](#4492) - **build:** limit locales to valid files when using the --all-lang option ([#4486](#4486)) ([d3db593](d3db593)), closes [#4485](#4485) - colorio.js patch mocking CSS ([#4456](#4456)) ([3ef9353](3ef9353)), closes [#4400](#4400) - correct typos in texts ([#4499](#4499)) ([11fad59](11fad59)) - **landmark-unique:** follow spec, aside -> landmark ([#4469](#4469)) ([e32f803](e32f803)), closes [#4460](#4460) - **required-attr:** allow aria-valuetext on slider instead of valuenow ([#4518](#4518)) ([135898b](135898b)), closes [#4515](#4515) This PR was opened by a robot 🤖 🎉
2 parents fff9b9d + a29af56 commit c49c8ea

File tree

309 files changed

+5633
-3465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+5633
-3465
lines changed

.circleci/config.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ jobs:
6161
paths:
6262
- node_modules
6363

64-
# Build and cache axe.js
64+
# Build and cache built files
6565
build_unix:
6666
<<: *defaults
6767
<<: *unix_box
6868
steps:
6969
- checkout
7070
- <<: *restore_dependency_cache_unix
71+
- run: npm run prepare
7172
- run: npm run build
7273
- save_cache:
7374
key: v9-cache-build-<< pipeline.git.revision >>

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ doc/api/*
77
doc/examples/jest_react/*.js
88

99
lib/core/imports/*.js
10+
lib/core/utils/uuid.js
1011
axe.js
11-
axe.min.js
12+
axe.min.js

.eslintrc.js

-181
This file was deleted.

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ updates:
3232
versions: ['>=9.0.0']
3333
- dependency-name: 'chai'
3434
versions: ['>=5.0.0']
35+
- dependency-name: 'conventional-commits-parser'
36+
versions: ['>=6.0.0']
3537
# Prevent Webpack error caused by v0.11+ of esbuild
3638
# @see https://github.com/dequelabs/axe-core/issues/3771
3739
- dependency-name: 'esbuild'
3840
versions: ['>=0.11.0']
41+
# Prevent colorjs.io issue caused by >v0.4.3
42+
# @see https://github.com/dequelabs/axe-core/issues/4428
43+
- dependency-name: 'colorjs.io'
44+
versions: ['>0.4.3']
3945
groups:
4046
# Any updates not caught by the group config will get individual PRs
4147
npm-low-risk:

.github/workflows/format.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
- run: npm run fmt
2222
# Prevent the prettierignore change from being committed.
2323
- run: git checkout .prettierignore
24-
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # tag=v5
24+
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # tag=v5
2525
with:
2626
commit_message: ':robot: Automated formatting fixes'

.github/workflows/test.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ jobs:
1818
node-version: 20
1919
cache: 'npm'
2020
- run: npm ci
21+
- run: npm run prepare
2122
- run: npm run build
22-
# v4 download seems to have some flakiness with the download of artifacts so pinning to v3 for now
23-
# @see https://github.com/actions/download-artifact/issues/249
24-
- uses: actions/upload-artifact@v3
23+
- uses: actions/upload-artifact@v4
2524
with:
2625
name: axe-core
2726
path: axe.js
@@ -39,7 +38,7 @@ jobs:
3938
- uses: actions/setup-node@v4
4039
with:
4140
node-version: ${{ matrix.node}}
42-
- uses: actions/download-artifact@v3
41+
- uses: actions/download-artifact@v4
4342
with:
4443
name: axe-core
4544
- run: npm run test:node

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ typings/axe-core/axe-core-tests.js
2828

2929
# doc
3030
doc/rule-descriptions.*.md
31-

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [4.10.0](https://github.com/dequelabs/axe-core/compare/v4.9.1...v4.10.0) (2024-07-29)
6+
7+
### Features
8+
9+
- **new-rule:** summary elements must have an accessible name ([#4511](https://github.com/dequelabs/axe-core/issues/4511)) ([0d8a99e](https://github.com/dequelabs/axe-core/commit/0d8a99eadd8d49e5d3ea0f11ad77be732148431e)), closes [#4510](https://github.com/dequelabs/axe-core/issues/4510)
10+
11+
### Bug Fixes
12+
13+
- **aria-allowed-attr:** allow aria-multiline=false for element with contenteditable ([#4537](https://github.com/dequelabs/axe-core/issues/4537)) ([f019068](https://github.com/dequelabs/axe-core/commit/f0190685722495d00be644cabb1c9741d74acdea))
14+
- **aria-allowed-attr:** allow aria-required=false when normally not allowed ([#4532](https://github.com/dequelabs/axe-core/issues/4532)) ([2e242e1](https://github.com/dequelabs/axe-core/commit/2e242e146929902c97e181e41fa45e656cf3eb51))
15+
- **aria-prohibited-attr:** allow aria-label/ledby on descendants of widget ([#4541](https://github.com/dequelabs/axe-core/issues/4541)) ([07c5d91](https://github.com/dequelabs/axe-core/commit/07c5d91c658bda6bcd2743950bf70f25abd1f9ae))
16+
- **aria-roledescription:** keep disabled with { runOnly: 'wcag2a' } ([#4526](https://github.com/dequelabs/axe-core/issues/4526)) ([5b4cb9d](https://github.com/dequelabs/axe-core/commit/5b4cb9d7992a4c07745e64708040777de64874bd)), closes [#4523](https://github.com/dequelabs/axe-core/issues/4523)
17+
- **autocomplete-valid:** incomplete for invalid but safe values ([#4500](https://github.com/dequelabs/axe-core/issues/4500)) ([e31a974](https://github.com/dequelabs/axe-core/commit/e31a974de395845c08af345f9458a8091e2b1c4b)), closes [#4492](https://github.com/dequelabs/axe-core/issues/4492)
18+
- **build:** limit locales to valid files when using the --all-lang option ([#4486](https://github.com/dequelabs/axe-core/issues/4486)) ([d3db593](https://github.com/dequelabs/axe-core/commit/d3db593991261ad44eef1c142d8a4646edde93fa)), closes [#4485](https://github.com/dequelabs/axe-core/issues/4485)
19+
- Prevent errors when loading axe in Angular + Jest ([#4456](https://github.com/dequelabs/axe-core/issues/4456)) ([3ef9353](https://github.com/dequelabs/axe-core/commit/3ef93531a574c2be76a92d59599d978714cca9d0)), closes [#4400](https://github.com/dequelabs/axe-core/issues/4400)
20+
- Minor grammatical fixes for some rules and checks ([#4499](https://github.com/dequelabs/axe-core/issues/4499)) ([11fad59](https://github.com/dequelabs/axe-core/commit/11fad598c25eadd29f35ef6be382d907057d4537))
21+
- **landmark-unique:** follow spec, aside -> landmark ([#4469](https://github.com/dequelabs/axe-core/issues/4469)) ([e32f803](https://github.com/dequelabs/axe-core/commit/e32f8034246a92e4132dc04f6310e2b414d6d43f)), closes [#4460](https://github.com/dequelabs/axe-core/issues/4460)
22+
- **required-attr:** allow aria-valuetext on slider instead of valuenow ([#4518](https://github.com/dequelabs/axe-core/issues/4518)) ([135898b](https://github.com/dequelabs/axe-core/commit/135898b38d5eb46c42170527a0ac9add425c5c3d)), closes [#4515](https://github.com/dequelabs/axe-core/issues/4515)
23+
524
### [4.9.1](https://github.com/dequelabs/axe-core/compare/v4.9.0...v4.9.1) (2024-05-06)
625

726
### Bug Fixes

Gruntfile.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ module.exports = function (grunt) {
2222
});
2323
} else if (grunt.option('all-lang')) {
2424
var localeFiles = require('fs').readdirSync('./locales');
25-
langs = localeFiles.map(function (file) {
26-
return '.' + file.replace('.json', '');
27-
});
25+
langs = localeFiles
26+
.filter(function (file) {
27+
return !file.startsWith('_') && file.endsWith('.json');
28+
})
29+
.map(function (file) {
30+
return '.' + file.replace('.json', '');
31+
});
2832
langs.unshift(''); // Add default
2933
} else {
3034
langs = [''];

axe.d.ts

+18-5
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,19 @@ declare namespace axe {
7070
| LabelledShadowDomSelector
7171
| LabelledFramesSelector;
7272
type SelectorList = Array<Selector | FramesSelector> | NodeList;
73+
type ContextProp = Selector | SelectorList;
7374
type ContextObject =
7475
| {
75-
include: Selector | SelectorList;
76-
exclude?: Selector | SelectorList;
76+
include: ContextProp;
77+
exclude?: ContextProp;
7778
}
7879
| {
79-
exclude: Selector | SelectorList;
80-
include?: Selector | SelectorList;
80+
exclude: ContextProp;
81+
include?: ContextProp;
8182
};
82-
type ElementContext = Selector | SelectorList | ContextObject;
83+
type ContextSpec = ContextProp | ContextObject;
84+
/** Synonym to ContextSpec */
85+
type ElementContext = ContextSpec;
8386

8487
type SerialSelector =
8588
| BaseSelector
@@ -406,6 +409,16 @@ declare namespace axe {
406409
shadowSelect: (selector: CrossTreeSelector) => Element | null;
407410
shadowSelectAll: (selector: CrossTreeSelector) => Element[];
408411
getStandards(): Required<Standards>;
412+
isContextSpec: (context: unknown) => context is ContextSpec;
413+
isContextObject: (context: unknown) => context is ContextObject;
414+
isContextProp: (context: unknown) => context is ContextProp;
415+
isLabelledFramesSelector: (
416+
selector: unknown
417+
) => selector is LabelledFramesSelector;
418+
isLabelledShadowDomSelector: (
419+
selector: unknown
420+
) => selector is LabelledShadowDomSelector;
421+
409422
DqElement: new (
410423
elm: Element,
411424
options?: { absolutePaths?: boolean }

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "axe-core",
3-
"version": "4.9.1",
3+
"version": "4.10.0",
44
"deprecated": true,
55
"contributors": [
66
{

build/cherry-pick.js

100644100755
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
const { execSync } = require('child_process');
24
const conventionalCommitsParser = require('conventional-commits-parser');
35
const chalk = require('chalk');
@@ -129,7 +131,7 @@ commitsToCherryPick.forEach(({ hash, type, scope, subject }) => {
129131

130132
try {
131133
execSync(`git cherry-pick ${hash} -X theirs`);
132-
} catch (e) {
134+
} catch {
133135
console.error(
134136
chalk.red.bold('\nAborting cherry-pick and reseting to master')
135137
);

build/tasks/validate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function fileExists(v, o) {
1414
var exists;
1515
try {
1616
exists = fs.existsSync(file);
17-
} catch (e) {
17+
} catch {
1818
return false;
1919
}
2020
return exists;

doc/API.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ In this example, we pass in the WCAG 2 A and AA tags into `axe.getRules` to retr
146146
```js
147147
[
148148
{
149-
description: "Ensures <area> elements of image maps have alternate text",
149+
description: "Ensure <area> elements of image maps have alternate text",
150150
help: "Active <area> elements must have alternate text",
151151
helpUrl: "https://dequeuniversity.com/rules/axe/3.5/area-alt?application=axeAPI",
152152
ruleId: "area-alt",
@@ -162,7 +162,7 @@ In this example, we pass in the WCAG 2 A and AA tags into `axe.getRules` to retr
162162
actIds: ['c487ae']
163163
},
164164
{
165-
description: "Ensures ARIA attributes are allowed for an element's role",
165+
description: "Ensure ARIA attributes are allowed for an element's role",
166166
help: "Elements must only use allowed ARIA attributes",
167167
helpUrl: "https://dequeuniversity.com/rules/axe/3.5/aria-allowed-attr?application=axeAPI",
168168
ruleId: "aria-allowed-attr",

0 commit comments

Comments
 (0)