Skip to content

Commit e473acf

Browse files
dependabot[bot]strakerWilcoFiers
authored
chore: bump prettier from 2.8.2 to 3.0.3 (#4210)
* chore: bump prettier from 2.8.2 to 3.0.3 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.2 to 3.0.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@2.8.2...3.0.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * 🤖 Automated formatting fixes * Correct xhtml doctype --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Steven Lambert <[email protected]> Co-authored-by: straker <[email protected]> Co-authored-by: Wilco Fiers <[email protected]> Co-authored-by: Wilco Fiers <[email protected]>
1 parent dc202ff commit e473acf

File tree

229 files changed

+685
-420
lines changed

Some content is hidden

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

229 files changed

+685
-420
lines changed

doc/examples/qunit/test/test.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<meta charset="utf-8" />

lib/checks/color/color-contrast-evaluate.js

+28-29
Original file line numberDiff line numberDiff line change
@@ -187,38 +187,37 @@ function findPseudoElement(
187187
} while ((vNode = vNode.parent));
188188
}
189189

190-
const getPseudoElementArea = memoize(function getPseudoElementArea(
191-
node,
192-
pseudo
193-
) {
194-
const style = window.getComputedStyle(node, pseudo);
195-
const matchPseudoStyle = (prop, value) =>
196-
style.getPropertyValue(prop) === value;
197-
if (
198-
matchPseudoStyle('content', 'none') ||
199-
matchPseudoStyle('display', 'none') ||
200-
matchPseudoStyle('visibility', 'hidden') ||
201-
matchPseudoStyle('position', 'absolute') === false
202-
) {
203-
return 0; // The pseudo element isn't visible
204-
}
190+
const getPseudoElementArea = memoize(
191+
function getPseudoElementArea(node, pseudo) {
192+
const style = window.getComputedStyle(node, pseudo);
193+
const matchPseudoStyle = (prop, value) =>
194+
style.getPropertyValue(prop) === value;
195+
if (
196+
matchPseudoStyle('content', 'none') ||
197+
matchPseudoStyle('display', 'none') ||
198+
matchPseudoStyle('visibility', 'hidden') ||
199+
matchPseudoStyle('position', 'absolute') === false
200+
) {
201+
return 0; // The pseudo element isn't visible
202+
}
205203

206-
if (
207-
getOwnBackgroundColor(style).alpha === 0 &&
208-
matchPseudoStyle('background-image', 'none')
209-
) {
210-
return 0; // There is no background
211-
}
204+
if (
205+
getOwnBackgroundColor(style).alpha === 0 &&
206+
matchPseudoStyle('background-image', 'none')
207+
) {
208+
return 0; // There is no background
209+
}
212210

213-
// Find the size of the pseudo element;
214-
const pseudoWidth = parseUnit(style.getPropertyValue('width'));
215-
const pseudoHeight = parseUnit(style.getPropertyValue('height'));
216-
if (pseudoWidth.unit !== 'px' || pseudoHeight.unit !== 'px') {
217-
// IE doesn't normalize to px. Infinity gets everything to undefined
218-
return pseudoWidth.value === 0 || pseudoHeight.value === 0 ? 0 : Infinity;
211+
// Find the size of the pseudo element;
212+
const pseudoWidth = parseUnit(style.getPropertyValue('width'));
213+
const pseudoHeight = parseUnit(style.getPropertyValue('height'));
214+
if (pseudoWidth.unit !== 'px' || pseudoHeight.unit !== 'px') {
215+
// IE doesn't normalize to px. Infinity gets everything to undefined
216+
return pseudoWidth.value === 0 || pseudoHeight.value === 0 ? 0 : Infinity;
217+
}
218+
return pseudoWidth.value * pseudoHeight.value;
219219
}
220-
return pseudoWidth.value * pseudoHeight.value;
221-
});
220+
);
222221

223222
function textIsEmojis(visibleText) {
224223
const options = { nonBmp: true };

lib/commons/dom/is-hidden-for-everyone.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,16 @@ const isHiddenSelf = memoize(function isHiddenSelfMemoized(vNode, isAncestor) {
6565
/**
6666
* Check the element and ancestors for visibility state
6767
*/
68-
const isHiddenAncestors = memoize(function isHiddenAncestorsMemoized(
69-
vNode,
70-
isAncestor
71-
) {
72-
if (isHiddenSelf(vNode, isAncestor)) {
73-
return true;
74-
}
68+
const isHiddenAncestors = memoize(
69+
function isHiddenAncestorsMemoized(vNode, isAncestor) {
70+
if (isHiddenSelf(vNode, isAncestor)) {
71+
return true;
72+
}
7573

76-
if (!vNode.parent) {
77-
return false;
78-
}
74+
if (!vNode.parent) {
75+
return false;
76+
}
7977

80-
return isHiddenAncestors(vNode.parent, true);
81-
});
78+
return isHiddenAncestors(vNode.parent, true);
79+
}
80+
);

lib/commons/dom/is-inert.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,16 @@ const isInertSelf = memoize(function isInertSelfMemoized(vNode, isAncestor) {
4040
/**
4141
* Check the element and ancestors for inert
4242
*/
43-
const isInertAncestors = memoize(function isInertAncestorsMemoized(
44-
vNode,
45-
isAncestor
46-
) {
47-
if (isInertSelf(vNode, isAncestor)) {
48-
return true;
49-
}
43+
const isInertAncestors = memoize(
44+
function isInertAncestorsMemoized(vNode, isAncestor) {
45+
if (isInertSelf(vNode, isAncestor)) {
46+
return true;
47+
}
5048

51-
if (!vNode.parent) {
52-
return false;
53-
}
49+
if (!vNode.parent) {
50+
return false;
51+
}
5452

55-
return isInertAncestors(vNode.parent, true);
56-
});
53+
return isInertAncestors(vNode.parent, true);
54+
}
55+
);

lib/commons/dom/is-visible-on-screen.js

+20-21
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,27 @@ export default function isVisibleOnScreen(vNode) {
3030
return isVisibleOnScreenVirtual(vNode);
3131
}
3232

33-
const isVisibleOnScreenVirtual = memoize(function isVisibleOnScreenMemoized(
34-
vNode,
35-
isAncestor
36-
) {
37-
if (vNode.actualNode && vNode.props.nodeName === 'area') {
38-
return !areaHidden(vNode, isVisibleOnScreenVirtual);
39-
}
33+
const isVisibleOnScreenVirtual = memoize(
34+
function isVisibleOnScreenMemoized(vNode, isAncestor) {
35+
if (vNode.actualNode && vNode.props.nodeName === 'area') {
36+
return !areaHidden(vNode, isVisibleOnScreenVirtual);
37+
}
4038

41-
if (isHiddenForEveryone(vNode, { skipAncestors: true, isAncestor })) {
42-
return false;
43-
}
39+
if (isHiddenForEveryone(vNode, { skipAncestors: true, isAncestor })) {
40+
return false;
41+
}
4442

45-
if (
46-
vNode.actualNode &&
47-
hiddenMethods.some(method => method(vNode, { isAncestor }))
48-
) {
49-
return false;
50-
}
43+
if (
44+
vNode.actualNode &&
45+
hiddenMethods.some(method => method(vNode, { isAncestor }))
46+
) {
47+
return false;
48+
}
5149

52-
if (!vNode.parent) {
53-
return true;
54-
}
50+
if (!vNode.parent) {
51+
return true;
52+
}
5553

56-
return isVisibleOnScreenVirtual(vNode.parent, true);
57-
});
54+
return isVisibleOnScreenVirtual(vNode.parent, true);
55+
}
56+
);

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"node-notifier": "^10.0.1",
164164
"npm-run-all": "^4.1.5",
165165
"outdent": "^0.8.0",
166-
"prettier": "^2.8.2",
166+
"prettier": "^3.0.3",
167167
"revalidator": "^0.3.1",
168168
"selenium-webdriver": "^4.7.1",
169169
"serve-handler": "^6.1.5",

test/commons/color/element-has-image.js

+13-10
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ describe('color.elementHasImage', function () {
1212
});
1313

1414
it('returns true when `HTMLElement` is of graphical type', function () {
15-
['img', 'canvas', 'object', 'iframe', 'video', 'svg'].forEach(function (
16-
nodeName
17-
) {
18-
var vNode = queryFixture(
19-
'<' + nodeName + ' id="target"></' + nodeName + '>'
20-
);
21-
var actual = elementHasImage(vNode.actualNode);
22-
assert.isTrue(actual);
23-
assert.equal(axe.commons.color.incompleteData.get('bgColor'), 'imgNode');
24-
});
15+
['img', 'canvas', 'object', 'iframe', 'video', 'svg'].forEach(
16+
function (nodeName) {
17+
var vNode = queryFixture(
18+
'<' + nodeName + ' id="target"></' + nodeName + '>'
19+
);
20+
var actual = elementHasImage(vNode.actualNode);
21+
assert.isTrue(actual);
22+
assert.equal(
23+
axe.commons.color.incompleteData.get('bgColor'),
24+
'imgNode'
25+
);
26+
}
27+
);
2528
});
2629

2730
it('returns false when `HTMLElement` has no background-image style set', function () {

test/integration/api/external/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ describe('external API', () => {
6363
});
6464
it('must have the signature String -> String {role.type}', () => {
6565
const keys = getKeys(axe.commons.aria.lookupTable.role);
66-
const types = getValues(axe.commons.aria.lookupTable.role).map(function (
67-
role
68-
) {
69-
return role.type;
70-
});
66+
const types = getValues(axe.commons.aria.lookupTable.role).map(
67+
function (role) {
68+
return role.type;
69+
}
70+
);
7171
keys.forEach(assert.isString);
7272
types.forEach(assert.isString);
7373
});

test/integration/full/all-rules/all-rules.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" xml:lang="en">
33
<head>
44
<title>all rules test</title>

test/integration/full/all-rules/frames/focusable.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html id="focusable">
33
<head>
44
<title>Hello</title>

test/integration/full/aria-hidden-body/frames/frame-hidden-body.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<script src="/axe.js"></script>

test/integration/full/aria-hidden-focus/modal.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<title>html-has-lang test</title>

test/integration/full/bypass/frames/level1-fail.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="violation2">
33
<head>
44
<meta charset="utf8" />

test/integration/full/bypass/frames/level1.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="pass2">
33
<head>
44
<meta charset="utf8" />

test/integration/full/bypass/frames/level2-a.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="pass3">
33
<head>
44
<meta charset="utf8" />

test/integration/full/bypass/frames/level2.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="pass4">
33
<head>
44
<meta charset="utf8" />

test/integration/full/bypass/header-iframe-fail.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="fail1">
33
<head>
44
<meta charset="utf8" />

test/integration/full/bypass/header-iframe-pass.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="pass1">
33
<head>
44
<meta charset="utf8" />

test/integration/full/configure-options/configure-options.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="main">
33
<head>
44
<title></title>

test/integration/full/context/context.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="main">
33
<head>
44
<title>frame exclude test</title>

test/integration/full/context/frames/level1.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html id="level1" lang="@(#$*">
33
<head>
44
<meta charset="utf8" />

test/integration/full/context/frames/level2-a.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html id="level2-a" lang="!@£">
33
<head>
44
<meta charset="utf8" />

test/integration/full/context/frames/level2-b.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html id="level2-b" xml:lang="$%^">
33
<head>
44
<meta charset="utf8" />

test/integration/full/context/frames/shadow-frame.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Shadow frame</title>

test/integration/full/context/shadow-dom.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en" id="main">
33
<head>
44
<title>frame exclude test</title>

test/integration/full/contrast-enhanced/simple.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Test Page</title>

test/integration/full/contrast/blending.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Color Contrast Blending Verification Tests</title>

test/integration/full/contrast/code-highlighting.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Test Page</title>

0 commit comments

Comments
 (0)