Closed michaelwarren1106 closed 3 years ago
Sorry, can I ask you to clarify the relationship? This seems to links to a different repo and I don't see 'inert' in it somewhere either...Is the question related to inert?
One of the good use cases of the inert feature is focus trapping. When a modal is active, for example, you might want to make all the content under the modal to be inert. The react aria package has focus trapping that has a similar functionality in “finding all the focusable elements”
Whenever we use _focusableElementsString
, we also check for tabindex
separately.
Technically an element can be made focusable by adding a manual tabindex even though no one should ever really do that.
Should the
_focusableElementsString
contain something like?
Adobe Spectrum reference https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/focus/src/FocusScope.tsx#L152-L171