You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
})
})
The removed restoreScroll option reset the scroll position when checking scrollable elements for color-contrast violations. The test is no longer needed following performance improvements to how the color-contrast rule works which doesn't rely on scrolling the element into view.
The text was updated successfully, but these errors were encountered:
What
Remove
restoreScroll
optionSee https://github.com/alphagov/govuk_publishing_components/blob/main/app/assets/javascripts/component_guide/accessibility-test.js#L27
Why
The option has been removed. See dequelabs/axe-core#2388
Anything else
I'm pretty sure that the following test is related, which checks the scroll position is
0
before and after the test, and can be removed.https://github.com/alphagov/govuk_publishing_components/blob/main/spec/javascripts/govuk_publishing_components/AccessibilityTestSpec.js#L87-L101
The removed
restoreScroll
option reset the scroll position when checking scrollable elements forcolor-contrast
violations. The test is no longer needed following performance improvements to how thecolor-contrast
rule works which doesn't rely on scrolling the element into view.The text was updated successfully, but these errors were encountered: