Skip to content

Commit

Permalink
Delete removed restoreScroll Axe API option
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-kirwan committed Oct 28, 2022
1 parent d4be674 commit 2651426
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
})

var axeOptions = {
restoreScroll: true,
include: [selector],
rules: axeRules
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,6 @@ describe('AccessibilityTest', function () {
})
})

it('should not scroll the page', function (done) {
var bigElement = '<div style="height: 1000px; width: 100px;"></div>'

addToDom(
bigElement + '<a href="#">Low contrast</a>' + 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('<a href="#">Low contrast</a>', 'a { background: white; color: #ddd }')

Expand Down

0 comments on commit 2651426

Please sign in to comment.