From 2651426b5b75a88190a1788a47c3cc2c306d89d7 Mon Sep 17 00:00:00 2001 From: Jon Kirwan <87758239+jon-kirwan@users.noreply.github.com> Date: Wed, 19 Oct 2022 11:14:32 +0100 Subject: [PATCH] Delete removed `restoreScroll` Axe API option --- CHANGELOG.md | 1 + .../component_guide/accessibility-test.js | 1 - .../AccessibilityTestSpec.js | 16 ---------------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb6019828..2376bbe644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * Fix issue with blue action link arrow svg ([PR #3039](https://github.com/alphagov/govuk_publishing_components/pull/3039)) * **BREAKING:** Fix referrer bug ([PR #3032](https://github.com/alphagov/govuk_publishing_components/pull/3032)) +* Delete removed `restoreScroll` Axe API option ([PR #3029](https://github.com/alphagov/govuk_publishing_components/pull/3029)) ## 31.2.0 diff --git a/app/assets/javascripts/component_guide/accessibility-test.js b/app/assets/javascripts/component_guide/accessibility-test.js index 7cae2dc58b..ab62eb9c3a 100644 --- a/app/assets/javascripts/component_guide/accessibility-test.js +++ b/app/assets/javascripts/component_guide/accessibility-test.js @@ -24,7 +24,6 @@ }) var axeOptions = { - restoreScroll: true, include: [selector], rules: axeRules } diff --git a/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js b/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js index 1a793e8fd9..59d0984c1d 100644 --- a/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js +++ b/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js @@ -84,22 +84,6 @@ describe('AccessibilityTest', function () { }) }) - it('should not scroll the page', function (done) { - var bigElement = '
' - - addToDom( - bigElement + 'Low contrast' + bigElement, - 'a { background: white; color: #ddd }' - ) - - expect(window.scrollY).toBe(0, 'should start at top of the page') - - AccessibilityTest(TEST_SELECTOR, function () { - expect(window.scrollY).toBe(0, 'should end at top of the page') - done() - }) - }) - it('should throw if there\'s a contrast issue', function (done) { addToDom('Low contrast', 'a { background: white; color: #ddd }')