diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c110698d9..7b27eb1ac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.6.2](https://github.com/dequelabs/axe-core/compare/v4.6.1...v4.6.2) (2022-12-23) + +### Bug Fixes + +- **color-contrast:** fix color-contrast check when running in an extension ([#3838](https://github.com/dequelabs/axe-core/issues/3838)) ([31a3e01](https://github.com/dequelabs/axe-core/commit/31a3e01e3df2ff4ab9ae4eebe93c644ce706a200)) + ### [4.6.1](https://github.com/dequelabs/axe-core/compare/v4.6.0...v4.6.1) (2022-12-14) ### Bug Fixes diff --git a/bower.json b/bower.json index e1250761ff..809161182d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "axe-core", - "version": "4.6.1", + "version": "4.6.2", "contributors": [ { "name": "David Sturley", diff --git a/doc/API.md b/doc/API.md index 60b040ba0e..63b531cd87 100644 --- a/doc/API.md +++ b/doc/API.md @@ -83,7 +83,7 @@ The `experimental`, `ACT` and `section508` tags are only added to some rules. Ea | `wcag2aaa` | WCAG 2.0 Level AAA | | `wcag21a` | WCAG 2.1 Level A | | `wcag21aa` | WCAG 2.1 Level AA | -| `wcag21aaa` | WCAG 2.1 Level AAA | +| `wcag22aa` | WCAG 2.2 Level AA | | `best-practice` | Common accessibility best practices | | `wcag***` | WCAG success criterion e.g. wcag111 maps to SC 1.1.1 | | `ACT` | W3C approved Accessibility Conformance Testing rules | diff --git a/lib/commons/color/get-background-color.js b/lib/commons/color/get-background-color.js index 88f44c578f..f564554517 100644 --- a/lib/commons/color/get-background-color.js +++ b/lib/commons/color/get-background-color.js @@ -141,6 +141,7 @@ function fullyEncompasses(node, rects) { rects = Array.isArray(rects) ? rects : [rects]; const nodeRect = node.getBoundingClientRect(); + let { right, bottom } = nodeRect; const style = window.getComputedStyle(node); const overflow = style.getPropertyValue('overflow'); @@ -148,18 +149,16 @@ function fullyEncompasses(node, rects) { ['scroll', 'auto'].includes(overflow) || node instanceof window.HTMLHtmlElement ) { - nodeRect.width = node.scrollWidth; - nodeRect.height = node.scrollHeight; - nodeRect.right = nodeRect.left + nodeRect.width; - nodeRect.bottom = nodeRect.top + nodeRect.height; + right = nodeRect.left + node.scrollWidth; + bottom = nodeRect.top + node.scrollHeight; } return rects.every(rect => { return ( rect.top >= nodeRect.top && - rect.bottom <= nodeRect.bottom && + rect.bottom <= bottom && rect.left >= nodeRect.left && - rect.right <= nodeRect.right + rect.right <= right ); }); } diff --git a/package-lock.json b/package-lock.json index 21c1603986..8a7601ab27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "axe-core", - "version": "4.6.1", + "version": "4.6.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "axe-core", - "version": "4.6.1", + "version": "4.6.2", "license": "MPL-2.0", "devDependencies": { "@axe-core/webdriverjs": "^4.4.3", diff --git a/package.json b/package.json index 7d5c6b1b85..9c2c689398 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "axe-core", "description": "Accessibility engine for automated Web UI testing", - "version": "4.6.1", + "version": "4.6.2", "license": "MPL-2.0", "engines": { "node": ">=4" diff --git a/sri-history.json b/sri-history.json index 662fc3b932..9bf2aa3484 100644 --- a/sri-history.json +++ b/sri-history.json @@ -330,5 +330,9 @@ "4.6.1": { "axe.js": "sha256-5YoRtLPmXJjZaeVXOVTTPf6DtevHdYBfD4oxaCBDCXw=", "axe.min.js": "sha256-8CV1yJR7ZBS/j8HkUf1OwOEib+WUH+QovSg8xOh9MVI=" + }, + "4.6.2": { + "axe.js": "sha256-s0nxznqMAZruIUcLdAZH24jit50KGy70xAjZn76l2qM=", + "axe.min.js": "sha256-EelQqyCeeroeVZcV89KAYgp8M/ZuqvmHQ+r67BBL5eA=" } }