Skip to content

Commit

Permalink
Merge pull request #3029 from alphagov/delete-removed-axe-api-option
Browse files Browse the repository at this point in the history
Delete removed `restoreScroll` Axe API option
  • Loading branch information
jon-kirwan authored Nov 11, 2022
2 parents 9593b94 + 07624c6 commit 1593c0e
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 @@ -10,6 +10,7 @@
## Unreleased
* Calculate viewport width correctly for navbar in Chrome and Firefox when Mac scrollbars are enabled ([PR #3016](https://github.com/alphagov/govuk_publishing_components/pull/3016))
* Include the words 'opens in new tab' as part of the share link ([PR #3028](https://github.com/alphagov/govuk_publishing_components/pull/3028))
* Delete removed `restoreScroll` Axe API option ([PR #3029](https://github.com/alphagov/govuk_publishing_components/pull/3029))

## 32.0.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 1593c0e

Please sign in to comment.