diff --git a/CHANGELOG.md b/CHANGELOG.md index 08c7be068f..5ea95a54cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ useful summary for people upgrading their application, not a replication of the commit log. +## Unreleased + +* Delete removed `restoreScroll` Axe API option ([PR #3029](https://github.com/alphagov/govuk_publishing_components/pull/3029)) + ## 32.0.0 * Track clicks on links with child elements ([PR #3042](https://github.com/alphagov/govuk_publishing_components/pull/3042)) 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 1073cb7bd7..a6e30becaf 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 }')