Skip to content
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

chore(Dropdown): update examples to show different appends #7095

Merged
merged 3 commits into from
Mar 25, 2022

Conversation

thatblindgeye
Copy link
Contributor

What: Closes #6824

Similar to PR #7087, this does not resolve the issue with appending to document.body, but rather cautions against it and provides the alternative of appending to "parent". Appending to "parent" should offer the same benefits of document.body, but also allow assistive technologies to navigate into the component's contents and also keep things in a more proper DOM order.

I also created another codesandbox to show both variants being used inside of a Modal: Dropdown appended inside Modal. This shows the similarity between them when opened inside a Modal, and also the difference if using Voice Over to try and navigate inside the Dropdown contents.

Additional issues:

@patternfly-build
Copy link
Contributor

patternfly-build commented Mar 21, 2022

Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should move the instructional text to the relevant example below. It's great information, but probably does not need to be the very first piece of information on the Dropdown page.

And just like the Select PR you also have open - I wonder what @mcarrano and @tlabaj would say about having an anti-example in the docs, even if it's a powerful instructive demonstration.

I think that I like it, personally.

@thatblindgeye
Copy link
Contributor Author

In addition to moving the verbiage I also added a quick explanation of what the differences between the two examples here are to match how I have the Select example description. That's easy enough to remove that + the anti-examples if that ends up being way to go, though.

Copy link
Contributor

@jessiehuff jessiehuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the verbiage. 🙂

@mcarrano
Copy link
Member

I like it, too!

@tlabaj tlabaj merged commit 6de39e6 into patternfly:main Mar 25, 2022
@thatblindgeye thatblindgeye deleted the dropdown_doc_body branch May 13, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropdown example (Append menu document body) isn't accessible by screen reader
8 participants