Skip to content

Why is the Popover modal by default? #3802

Answered by devongovett
loicplaire asked this question in Q&A
Discussion options

You must be logged in to vote

The reasons are mostly related to React portals.

  1. Because overlays are rendered in a portal at the end of the document body, there may be a lot of elements between the original trigger element and the popover. This can make it very difficult for screen reader users (especially on mobile) to move between the trigger and the overlay. For this reason, we hide all elements outside the overlay from screen reader users which keeps their focus contained within the overlay.
  2. As for scrolling, this was a recent change in the last release. The new behavior of preventing scrolling outside popovers/menus actually matches native behavior (at least on macOS). If you try a native <select> for example, yo…

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
12 replies
@sarimarton
Comment options

@kruzliak-juraj
Comment options

@devongovett
Comment options

@kruzliak-juraj
Comment options

@kruzliak-juraj
Comment options

Answer selected by devongovett
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants