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
[BUG-7463] Response example tabs a11y #7464
[BUG-7463] Response example tabs a11y #7464
Conversation
Update tabs to use <button> elements instead of <a> Add aria roles for tablist, tabs, and tabpanel Add aria attributes for additional a11y compliance and screen reader accessibility
- Remove aria-controls and aria-labelledby attributes along with the removal of ids - Replace ids with data-name attribute for tabpanels - Add cypress test 7463 and update swos-63
Thanks @3ptmonster; We'll get into review ASAP. I was wandering - how it is that you're familiar with swos-63 ? |
@char0n I was not familiar with it at first, but before creating the PR I ran all the tests and it was the only one to fail, so I looked into it before making the appropriate updates. |
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.
Great work!
Please have a look at my review comments and let me know if they make sense.
This PR changes package-lock.json
file; there's not reason why it should. Can you please remove changes to packe-lock.json
from this PR? Thanks!
|
- Move tabs test file to tests/a11y directory
Remove unnecessary issue # from describe statement
…s and aria-labelledby attributes
@Cgfor3 thanks for the additional effort and work! I'll re-review during tomorrow. |
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.
The functionality and test looks good! Thanks for your work on this. Before we move to merging I'll like to simplify this code if we can.
Consider my further comments and nitpicks
…entiate between "schema" and "model" Updated affected tests accordingly
@3ptmonster this has been a great experience collaborating with! Hope you'll keep those a11n PR comming ;] Waiting for tests to pass and going for a merge |
I appreciate all the help and feedback! Definitely looking forward to collaborating again. |
@3ptmonster we have a visual regression after this PR described here: #7517 |
Are there documented design requirements for that call-to-action element? What would be the best way for me to assist with this regression? |
After the changes we made, the ideal outcome would be if the UI looked the same. I did tested it locally, but unfortunately I forgot to open the changes in Incognito Window; so the cache kicked in.
It's being handled in #7517 quite well. This was just FYI. |
<button>
elements instead of<a>
id
s withdata-name
attribute for tabpanelstest/e2e-cypress/tests/a11y
directory and add cypress test 7463Description
The tabs implementation for Example Value and Schema/Model is not keyboard navigable.
Motivation and Context
This change is required because the implementation as it stands is not keyboard navigable, and is therefore broken for keyboard-only users.
Fixes #7463 well as a high-priority item on this larger a11y open issue list.
How Has This Been Tested?
Environment
OS: macOS 11.5 Big Sur
Browser(s):
Node version: 14.15.0
npm version: 6.14.8
I forked the master branch and ran the petstore in my local environment to test the changes. The testing consisted of keyboard-only navigation through the petstore with the macOS VoiceOver utility in both Chrome and Safari. I pressed the Tab key until I was focused on the button labeled
Example Value
, then pressed Tab a second time to ensure the focus changed to the button labeledModel
. Once those were satisfied, the third Tab press was done to test that focus changed to the tabpanel.Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests