Modals, ajax and focus #1328
Labels
accessibility
CMS
Issue affects CMS
CXM
Issue affects CXM
javascript
Pull requests that update Javascript code
XFP
Issue affects XFP
Currently, modals that load content with AJAX require
trapFocus()
to be called on AJAX completion. This has been raised as an issue by product teams as has the list of allowed elements within thetrapFocus
method.This has highlighted the wide variety of modals we have across products, such as:
Recommended action:
ModalFocusService
to check that element trying to gain focus is within the modal, rather than passing it a jQuery collection of the modal (to avoid having to calltrapFocus
on AJAX completion).ModalFocusService
should control which elements can be focussed.Related info:
https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/dialog-modal/js/dialog.js
The text was updated successfully, but these errors were encountered: