-
Notifications
You must be signed in to change notification settings - Fork 9.1k
[BUG-7463] Response example tabs a11y #7464
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
Merged
char0n
merged 12 commits into
swagger-api:master
from
3ptmonster:bug/7463-keyboard-nav-response-tabs
Sep 17, 2021
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a54c40c
[BUG-7463]: Response tabs not keyboard navigable
Cgfor3 9add398
- Remove ids from tabs and tabpanels to prevent id duplication
Cgfor3 59a9e1f
- Restore package-lock.json
Cgfor3 deb2243
Rename test file to be more descriptive of what is being tested.
Cgfor3 bee67e0
Add id attributes to both tabs and tabpanels to leverage aria-control…
Cgfor3 40d89bc
Merge branch 'master' into bug/7463-keyboard-nav-response-tabs
3ptmonster 8d7b868
Nit changes around the use of cx and removal of unnecessary quotes
Cgfor3 4766dfc
Updated data-name attribute to use "model" and remove logic to differ…
Cgfor3 21bae3b
Merge branch 'master' into bug/7463-keyboard-nav-response-tabs
char0n f67bc65
Update src/core/components/model-example.jsx
char0n b866ec3
Merge branch 'master' into bug/7463-keyboard-nav-response-tabs
char0n dfe5ba5
Merge branch 'master' into bug/7463-keyboard-nav-response-tabs
char0n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
describe("Response tab elements", () => { | ||
describe("ModelExample within Operation", () => { | ||
it("should render Example tabpanel by default", () => { | ||
cy | ||
.visit("/?url=/documents/petstore-expanded.openapi.yaml") | ||
.get("#operations-default-addPet") | ||
.click() | ||
.get("div[data-name=examplePanel]") | ||
.first() | ||
.should("have.attr", "aria-hidden", "false") | ||
}) | ||
it("should click Schema tab button and render Schema tabpanel for OpenAPI 3", () => { | ||
cy | ||
.visit("/?url=/documents/petstore-expanded.openapi.yaml") | ||
.get("#operations-default-addPet") | ||
.click() | ||
.get("button.tablinks[data-name=schema]") | ||
.first() | ||
.click() | ||
.get("div[data-name=schemaPanel]") | ||
.first() | ||
.should("have.attr", "aria-hidden", "false") | ||
}) | ||
it("should click Model tab button and render Model tabpanel for OpenAPI 2", () => { | ||
cy | ||
.visit("/?url=/documents/petstore.swagger.yaml") | ||
.get("#operations-pet-addPet") | ||
.click() | ||
.get("button.tablinks[data-name=model]") | ||
.click() | ||
.get("div[data-name=modelPanel]") | ||
.should("have.attr", "aria-hidden", "false") | ||
}) | ||
}) | ||
}) |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.