-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[326] | Skip to main content navigation #352
Conversation
it 'moves focus to main content when using keyboard' do | ||
find('body').send_keys(:tab) | ||
find('.usa-skipnav', visible: true).send_keys(:return) | ||
expect(page.evaluate_script('document.activeElement.id')).to eq('main-content') | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the duplicated specs this looks great! I think it's important to keep system specs as minimal as possible to keep the overall test suite running faster.
Skip button works well though 🎉 How did you find the usa-skipnav
? I can't even find it on google 👀
it 'passes accessibility checks' do | ||
expect(page).to be_axe_clean | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicated in logins_spec.rb
it 'passes accessibility checks' do | ||
expect(page).to be_axe_clean | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicated in phases_spec.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stepchud I'll remove those duplicate tests, thanks! As for usa-skipnav
- I was super surprised that USWDS didn't have any information about skip navs, so I tabbed while on the USWDS site and it uses a usa-skipnav
component. It works well and is exactly what USWDS uses!
Related ticket: #326
Add "skip to main content" accessibility navigation to the top of the page. This allows a user to jump to the main page area using keyboard navigation.
WAVE