Created
October 10, 2018 19:12
-
-
Save bensheldon/49ea0b97f144bdbb4bd113fc5bea1c78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_accessibility(scroll_to_top: true) | |
return if Capybara.current_driver != Capybara.javascript_driver | |
expect(page).to be_accessible.skipping( | |
'color-contrast', | |
'landmark-one-main', | |
'region', | |
'radiogroup', | |
'label', | |
'heading-order', | |
) | |
if scroll_to_top | |
page.execute_script "window.scrollTo(0,0)" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment