Skip to content

Question about Disclosures and command-click to open in new tab #1884

Answered by andioneto
jweintraub asked this question in Q&A
Discussion options

You must be logged in to vote

@jweintraub Thank you for your patience while we finalize our response!

This is possible and can be done accessibly, but it must be created with the disclosure primitive. Below is an outline of our suggested approach for the best experience. 👇

The DisclosureHeader is a heading element that wraps a button. We can't wrap the DisclosureHeader with an anchor because that would create a DOM tree where two actionable/focusable elements are nested, which is inaccessible. Check out our disclosure accessibility documentation to learn more about this constraint.

Thankfully we can use the disclosure primitive to render the DisclosureHeading as an anchor with an aria role “button.”

If we take this ap…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jweintraub
Comment options

Answer selected by andioneto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants