Semantic-ui-react: Modal: implement focus trap

Created on 1 Nov 2017  路  5Comments  路  Source: Semantic-Org/Semantic-UI-React

Modal should not let focus leave the components inside the dialog. Also it should autofocus the first component in the dialog (if no autofocus was specified).

More on Modals and keyboard traps:
https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex

Steps

1) Open any modal on the example page: https://react.semantic-ui.com/modules/modal
2) Press tab multiple times

Expected Result

Focus should never enter the dimmed components below

Actual Result

Focus does enter the dimmed components below

Version

Current
Tested in Chrome Version 61.0.3163.100 (Official Build) (64-bit)

Testcase

https://react.semantic-ui.com/modules/modal

enhancement help wanted stale

Most helpful comment

How would I have the priority of this raised?

One consequence of this issue is that Confirm and Modal are not useful in our project.

Thanks!

All 5 comments

Yes, we should impliment focus trap on modal, here is good example. However, it's a low priority enchantment. Contributions are welcome.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

How would I have the priority of this raised?

One consequence of this issue is that Confirm and Modal are not useful in our project.

Thanks!

I think this is a priority, reopening. Thoughts on adding this to the project dependencies?

https://github.com/theKashey/react-focus-lock

We've had luck using it in a few projects at my company.

There has been no activity in this thread for 180 days. While we care about every issue and we鈥檇 love to see this fixed, the core team鈥檚 time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one.

However, PRs for this issue will of course be accepted and welcome!

If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks!

Was this page helpful?
0 / 5 - 0 ratings