Skip to content

Commit

Permalink
chore: bump prettier from 2.8.2 to 3.0.3 (#4210)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>

* 🤖 Automated formatting fixes

* Correct xhtml doctype

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
Co-authored-by: straker <straker@users.noreply.github.com>
Co-authored-by: Wilco Fiers <wilco.fiers@deque.com>
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
  • Loading branch information
5 people committed Oct 31, 2023
1 parent dc202ff commit e473acf
Show file tree
Hide file tree
Showing 229 changed files with 685 additions and 420 deletions.
2 changes: 1 addition & 1 deletion doc/examples/qunit/test/test.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
Expand Down
57 changes: 28 additions & 29 deletions lib/checks/color/color-contrast-evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,38 +187,37 @@ function findPseudoElement(
} while ((vNode = vNode.parent));
}

const getPseudoElementArea = memoize(function getPseudoElementArea(
node,
pseudo
) {
const style = window.getComputedStyle(node, pseudo);
const matchPseudoStyle = (prop, value) =>
style.getPropertyValue(prop) === value;
if (
matchPseudoStyle('content', 'none') ||
matchPseudoStyle('display', 'none') ||
matchPseudoStyle('visibility', 'hidden') ||
matchPseudoStyle('position', 'absolute') === false
) {
return 0; // The pseudo element isn't visible
}
const getPseudoElementArea = memoize(
function getPseudoElementArea(node, pseudo) {
const style = window.getComputedStyle(node, pseudo);
const matchPseudoStyle = (prop, value) =>
style.getPropertyValue(prop) === value;
if (
matchPseudoStyle('content', 'none') ||
matchPseudoStyle('display', 'none') ||
matchPseudoStyle('visibility', 'hidden') ||
matchPseudoStyle('position', 'absolute') === false
) {
return 0; // The pseudo element isn't visible
}

if (
getOwnBackgroundColor(style).alpha === 0 &&
matchPseudoStyle('background-image', 'none')
) {
return 0; // There is no background
}
if (
getOwnBackgroundColor(style).alpha === 0 &&
matchPseudoStyle('background-image', 'none')
) {
return 0; // There is no background
}

// Find the size of the pseudo element;
const pseudoWidth = parseUnit(style.getPropertyValue('width'));
const pseudoHeight = parseUnit(style.getPropertyValue('height'));
if (pseudoWidth.unit !== 'px' || pseudoHeight.unit !== 'px') {
// IE doesn't normalize to px. Infinity gets everything to undefined
return pseudoWidth.value === 0 || pseudoHeight.value === 0 ? 0 : Infinity;
// Find the size of the pseudo element;
const pseudoWidth = parseUnit(style.getPropertyValue('width'));
const pseudoHeight = parseUnit(style.getPropertyValue('height'));
if (pseudoWidth.unit !== 'px' || pseudoHeight.unit !== 'px') {
// IE doesn't normalize to px. Infinity gets everything to undefined
return pseudoWidth.value === 0 || pseudoHeight.value === 0 ? 0 : Infinity;
}
return pseudoWidth.value * pseudoHeight.value;
}
return pseudoWidth.value * pseudoHeight.value;
});
);

function textIsEmojis(visibleText) {
const options = { nonBmp: true };
Expand Down
23 changes: 11 additions & 12 deletions lib/commons/dom/is-hidden-for-everyone.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,16 @@ const isHiddenSelf = memoize(function isHiddenSelfMemoized(vNode, isAncestor) {
/**
* Check the element and ancestors for visibility state
*/
const isHiddenAncestors = memoize(function isHiddenAncestorsMemoized(
vNode,
isAncestor
) {
if (isHiddenSelf(vNode, isAncestor)) {
return true;
}
const isHiddenAncestors = memoize(
function isHiddenAncestorsMemoized(vNode, isAncestor) {
if (isHiddenSelf(vNode, isAncestor)) {
return true;
}

if (!vNode.parent) {
return false;
}
if (!vNode.parent) {
return false;
}

return isHiddenAncestors(vNode.parent, true);
});
return isHiddenAncestors(vNode.parent, true);
}
);
23 changes: 11 additions & 12 deletions lib/commons/dom/is-inert.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,16 @@ const isInertSelf = memoize(function isInertSelfMemoized(vNode, isAncestor) {
/**
* Check the element and ancestors for inert
*/
const isInertAncestors = memoize(function isInertAncestorsMemoized(
vNode,
isAncestor
) {
if (isInertSelf(vNode, isAncestor)) {
return true;
}
const isInertAncestors = memoize(
function isInertAncestorsMemoized(vNode, isAncestor) {
if (isInertSelf(vNode, isAncestor)) {
return true;
}

if (!vNode.parent) {
return false;
}
if (!vNode.parent) {
return false;
}

return isInertAncestors(vNode.parent, true);
});
return isInertAncestors(vNode.parent, true);
}
);
41 changes: 20 additions & 21 deletions lib/commons/dom/is-visible-on-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,27 @@ export default function isVisibleOnScreen(vNode) {
return isVisibleOnScreenVirtual(vNode);
}

const isVisibleOnScreenVirtual = memoize(function isVisibleOnScreenMemoized(
vNode,
isAncestor
) {
if (vNode.actualNode && vNode.props.nodeName === 'area') {
return !areaHidden(vNode, isVisibleOnScreenVirtual);
}
const isVisibleOnScreenVirtual = memoize(
function isVisibleOnScreenMemoized(vNode, isAncestor) {
if (vNode.actualNode && vNode.props.nodeName === 'area') {
return !areaHidden(vNode, isVisibleOnScreenVirtual);
}

if (isHiddenForEveryone(vNode, { skipAncestors: true, isAncestor })) {
return false;
}
if (isHiddenForEveryone(vNode, { skipAncestors: true, isAncestor })) {
return false;
}

if (
vNode.actualNode &&
hiddenMethods.some(method => method(vNode, { isAncestor }))
) {
return false;
}
if (
vNode.actualNode &&
hiddenMethods.some(method => method(vNode, { isAncestor }))
) {
return false;
}

if (!vNode.parent) {
return true;
}
if (!vNode.parent) {
return true;
}

return isVisibleOnScreenVirtual(vNode.parent, true);
});
return isVisibleOnScreenVirtual(vNode.parent, true);
}
);
18 changes: 9 additions & 9 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
Expand Up @@ -163,7 +163,7 @@
"node-notifier": "^10.0.1",
"npm-run-all": "^4.1.5",
"outdent": "^0.8.0",
"prettier": "^2.8.2",
"prettier": "^3.0.3",
"revalidator": "^0.3.1",
"selenium-webdriver": "^4.7.1",
"serve-handler": "^6.1.5",
Expand Down
23 changes: 13 additions & 10 deletions test/commons/color/element-has-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ describe('color.elementHasImage', function () {
});

it('returns true when `HTMLElement` is of graphical type', function () {
['img', 'canvas', 'object', 'iframe', 'video', 'svg'].forEach(function (
nodeName
) {
var vNode = queryFixture(
'<' + nodeName + ' id="target"></' + nodeName + '>'
);
var actual = elementHasImage(vNode.actualNode);
assert.isTrue(actual);
assert.equal(axe.commons.color.incompleteData.get('bgColor'), 'imgNode');
});
['img', 'canvas', 'object', 'iframe', 'video', 'svg'].forEach(
function (nodeName) {
var vNode = queryFixture(
'<' + nodeName + ' id="target"></' + nodeName + '>'
);
var actual = elementHasImage(vNode.actualNode);
assert.isTrue(actual);
assert.equal(
axe.commons.color.incompleteData.get('bgColor'),
'imgNode'
);
}
);
});

it('returns false when `HTMLElement` has no background-image style set', function () {
Expand Down
10 changes: 5 additions & 5 deletions test/integration/api/external/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ describe('external API', () => {
});
it('must have the signature String -> String {role.type}', () => {
const keys = getKeys(axe.commons.aria.lookupTable.role);
const types = getValues(axe.commons.aria.lookupTable.role).map(function (
role
) {
return role.type;
});
const types = getValues(axe.commons.aria.lookupTable.role).map(
function (role) {
return role.type;
}
);
keys.forEach(assert.isString);
types.forEach(assert.isString);
});
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/all-rules/all-rules.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" xml:lang="en">
<head>
<title>all rules test</title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/all-rules/frames/focusable.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html id="focusable">
<head>
<title>Hello</title>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<script src="/axe.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/aria-hidden-focus/modal.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>html-has-lang test</title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/bypass/frames/level1-fail.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="violation2">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/bypass/frames/level1.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="pass2">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/bypass/frames/level2-a.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="pass3">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/bypass/frames/level2.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="pass4">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/bypass/header-iframe-fail.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="fail1">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/bypass/header-iframe-pass.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="pass1">
<head>
<meta charset="utf8" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="main">
<head>
<title></title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/context/context.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="main">
<head>
<title>frame exclude test</title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/context/frames/level1.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html id="level1" lang="@(#$*">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/context/frames/level2-a.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html id="level2-a" lang="!@£">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/context/frames/level2-b.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html id="level2-b" xml:lang="$%^">
<head>
<meta charset="utf8" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/context/frames/shadow-frame.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Shadow frame</title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/context/shadow-dom.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" id="main">
<head>
<title>frame exclude test</title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/contrast-enhanced/simple.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Test Page</title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/contrast/blending.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Color Contrast Blending Verification Tests</title>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/full/contrast/code-highlighting.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Test Page</title>
Expand Down
Loading

0 comments on commit e473acf

Please sign in to comment.