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 Nov 2, 2022
1 parent 57487c7 commit e4c2af2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
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 e4c2af2

Please sign in to comment.