reactjs/react-modal

Replace focus trap with `inert`

Open

#1011 opened on Mar 29, 2023

View on GitHub
 (1 comment) (4 reactions) (0 assignees)JavaScript (7,294 stars) (828 forks)batch import
accessibilitybrowser apicombining librariesdependenciesdiscussioneasyfeaturegood first issue

Description

Now that browsers have good support for inert, could we consider replacing the custom focus trap logic with this?

Alternatively, we could use the dialog element so we get this behaviour for free.

Contributor guide