Skip to content

Commit

Permalink
chore(release): 4.10.2 (#4619)
Browse files Browse the repository at this point in the history
### Bug Fixes

- **get-ancestry:** don't error when there is no parent
([#4617](#4617))
([6c07102](6c07102))
  • Loading branch information
WilcoFiers authored Oct 23, 2024
2 parents b581695 + 98ca0cd commit 4e226c1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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.

### [4.10.2](https://github.com/dequelabs/axe-core/compare/v4.10.1...v4.10.2) (2024-10-21)

### Bug Fixes

- **get-ancestry:** don't error when there is no parent ([#4617](https://github.com/dequelabs/axe-core/issues/4617)) ([6c07102](https://github.com/dequelabs/axe-core/commit/6c07102b1d29145b8dc5f1d96229f3d0b8b38068))

### [4.10.1](https://github.com/dequelabs/axe-core/compare/v4.10.0...v4.10.1) (2024-10-16)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axe-core",
"version": "4.10.1",
"version": "4.10.2",
"deprecated": true,
"contributors": [
{
Expand Down
2 changes: 1 addition & 1 deletion lib/core/utils/get-ancestry.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function generateAncestry(node) {
if (
nodeName !== 'head' &&
nodeName !== 'body' &&
parentNode.children.length > 1
parentNode?.children.length > 1
) {
const index = Array.prototype.indexOf.call(parentNode.children, node) + 1;
nthChild = `:nth-child(${index})`;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "axe-core",
"description": "Accessibility engine for automated Web UI testing",
"version": "4.10.1",
"version": "4.10.2",
"license": "MPL-2.0",
"engines": {
"node": ">=4"
Expand Down
4 changes: 4 additions & 0 deletions sri-history.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,9 @@
"4.10.1": {
"axe.js": "sha256-KQDnBck/AyiC+OE3x0AJ/EQYykYTnH+1z7punr4Xc0c=",
"axe.min.js": "sha256-OBXf33U9n+qCj0mI9MLkiVyC1nCzabDnmopjyuv1gZ4="
},
"4.10.2": {
"axe.js": "sha256-+gZL/deLqt1La/rK9St/UzNzWa4co71yGT5I07FuZuE=",
"axe.min.js": "sha256-tRHNnewBx29LKtFyO2a22zfUwutO0ZkHbhgp2e57deM="
}
}
5 changes: 5 additions & 0 deletions test/core/utils/get-ancestry.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ describe('axe.utils.getAncestry', () => {
assert.isNotNull(document.querySelector(sel1));
});

it('should not throw when there is no parent', () => {
const node = document.createElement('section');
assert.doesNotThrow(() => axe.utils.getAncestry(node));
});

it('generates selectors of nested shadow trees', () => {
const node = document.createElement('section');
fixture.appendChild(node);
Expand Down

0 comments on commit 4e226c1

Please sign in to comment.