diff --git a/__mocks__/tabbable.js b/__mocks__/tabbable.js new file mode 100644 index 0000000000..d968824eb4 --- /dev/null +++ b/__mocks__/tabbable.js @@ -0,0 +1,16 @@ +// https://github.com/focus-trap/tabbable#testing-in-jsdom +const lib = jest.requireActual("tabbable"); + +const tabbable = { + ...lib, + tabbable: (node, options) => + lib.tabbable(node, { ...options, displayCheck: "none" }), + focusable: (node, options) => + lib.focusable(node, { ...options, displayCheck: "none" }), + isFocusable: (node, options) => + lib.isFocusable(node, { ...options, displayCheck: "none" }), + isTabbable: (node, options) => + lib.isTabbable(node, { ...options, displayCheck: "none" }), +}; + +module.exports = tabbable; diff --git a/src/components/WelcomeModal/WelcomeModal.tsx b/src/components/WelcomeModal/WelcomeModal.tsx index eea557e6af..6a095dcd88 100644 --- a/src/components/WelcomeModal/WelcomeModal.tsx +++ b/src/components/WelcomeModal/WelcomeModal.tsx @@ -78,7 +78,6 @@ const WelcomeModal: React.FC = ({ z-index: ${zIndex.max_do_not_use}; `} size="large" - initialFocus=".slick-active" > {title && {title}}