-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Bootbox.js lacks the ability for modals to trap focus within an opened modal. This is a web accessibility issue that should to be resolved.
Bootstrap.js version v5.x has a built-in ability to trap focus to an opened model.
Requested Features:
- When a modal is opened, there should be the ability to set the initial focus.
- As a User Tabs or Shirt+Tabs through the opened modal elements, focus should remain within the opened modal.
- When a modal is closed, focus should be returned to the element that triggered opening of the modal.
References:
WCAG 2.4.3 Focus Order | If a Web page can be navigated sequentially and the navigation sequences affect meaning or operation, focusable components receive focus in an order that preserves meaning and operability.
WCAG 3.2.1 On Focus | When any user interface component receives focus, it does not initiate a change of context.
Bootstrap util/focustrap.js
https://github.com/twbs/bootstrap/blob/fecd219983539aa0110a7e09d31b8aa4d5fb4348/js/src/util/focustrap.js
benoit-lefebvre