Skip to content

Commit

Permalink
Merge pull request #2982 from dequelabs/merge-master-4.2.2
Browse files Browse the repository at this point in the history
chore: merge master
  • Loading branch information
WilcoFiers authored Jun 8, 2021
2 parents 9b6ccd0 + 61052ca commit cb4939f
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 21 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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.2.2](https://github.com/dequelabs/axe-core/compare/v4.2.1...v4.2.2) (2021-06-03)

### Bug Fixes

- **aria-allowed-attr:** allow aria-posinset and aria-setsize on row elements for treegrids ([#2952](https://github.com/dequelabs/axe-core/issues/2952)) ([3023e69](https://github.com/dequelabs/axe-core/commit/3023e697b85c13f18f2cbb46b202400d8ce6a10d))
- **heading-order:** Prevent crash on page with iframes but no headings ([#2965](https://github.com/dequelabs/axe-core/issues/2965)) ([4b7db37](https://github.com/dequelabs/axe-core/commit/4b7db3763735891972b8a13d6622fa30a687f3cb))
- **meta-viewport:** test that a user-scalable number does not prevent zoom ([048c5c1](https://github.com/dequelabs/axe-core/commit/048c5c18c8245a43721a12237ac5f07f5b4a856b))
- JS error in @axe-core/react caused by stale reference to heading ([3afda4e](https://github.com/dequelabs/axe-core/commit/3afda4effc4a099632138c5874ab305baaa5934a))

### [4.2.1](https://github.com/dequelabs/axe-core/compare/v4.2.0...v4.2.1) (2021-05-18)

### 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.2.1",
"version": "4.2.2",
"contributors": [
{
"name": "David Sturley",
Expand Down
16 changes: 8 additions & 8 deletions lib/checks/navigation/heading-order-after.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default function headingOrderAfter(results) {
// Construct a map of all headings on the page
const headingOrder = getHeadingOrder(results);
results.forEach(result => {
result.result = getHeadingOrderOutcome(result, headingOrder)
result.result = getHeadingOrderOutcome(result, headingOrder);
});
return results;
}
Expand All @@ -11,20 +11,20 @@ export default function headingOrderAfter(results) {
* Determine check outcome, based on the position of the result in the headingOrder
*/
function getHeadingOrderOutcome(result, headingOrder) {
const index = findHeadingOrderIndex(headingOrder, result.node.ancestry)
const index = findHeadingOrderIndex(headingOrder, result.node.ancestry);
const currLevel = headingOrder[index]?.level ?? -1;
const prevLevel = headingOrder[index - 1]?.level ?? -1;

// First heading always passes
if (index === 0) {
return true
};
return true;
}
// Heading not in the map
if (currLevel === -1) {
return undefined;
return undefined;
}
// Check if a heading is skipped
return (currLevel - prevLevel <= 1)
return currLevel - prevLevel <= 1;
}

/**
Expand Down Expand Up @@ -73,7 +73,7 @@ function mergeHeadingOrder(mergedHeadingOrder, result) {

/**
* Determine where the iframe results fit into the top-level heading order
*
*
* If a frame has no headings, but it does have iframes we might not have a result.
* We can account for this by finding the closest ancestor we do know about.
*/
Expand All @@ -83,7 +83,7 @@ function getFrameIndex(headingOrder, frameAncestry) {
if (index !== -1) {
return index;
}
frameAncestry = shortenArray(frameAncestry, 1)
frameAncestry = shortenArray(frameAncestry, 1);
}
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion 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.2.1",
"version": "4.2.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 @@ -230,5 +230,9 @@
"4.2.1": {
"axe.js": "sha256-DK0go8gPzyLAfXpA0r1wKNnpIYqSAtKJx2XkUxw3cp8=",
"axe.min.js": "sha256-GY7NT5JqpkYWliaJ+xXDHf0t5o30jVvEHb5KRVXykXA="
},
"4.2.2": {
"axe.js": "sha256-K3oF47ZvKGUvc3E1qiF7l3pyLK9WoxuUobm1EuWJFiQ=",
"axe.min.js": "sha256-uUSPcE2E0gEuXZYQaEoMQAn1Q34H7JSfjUzDwvVaB8A="
}
}
17 changes: 8 additions & 9 deletions test/integration/full/heading-order/no-heading-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ describe('heading-order-partial-context-with-iframe test', function() {
var results;
before(function(done) {
axe.testUtils.awaitNestedLoad(function() {
axe.run(
{ exclude: ['#mocha'] },
{ runOnly: ['heading-order'] },
function(err, r) {
assert.isNull(err);
results = r;
done();
}
);
axe.run({ exclude: ['#mocha'] }, { runOnly: ['heading-order'] }, function(
err,
r
) {
assert.isNull(err);
results = r;
done();
});
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ describe('heading-order-partial-context-with-iframe test', function() {
});
});


it('should find 1 passes', function() {
assert.lengthOf(results.passes, 1);
assert.lengthOf(results.passes[0].nodes, 1);
Expand Down

0 comments on commit cb4939f

Please sign in to comment.