diff --git a/docs/data/base/components/modal/UseModal.js b/docs/data/base/components/modal/UseModal.js index b35a6642a33844..02be482df395da 100644 --- a/docs/data/base/components/modal/UseModal.js +++ b/docs/data/base/components/modal/UseModal.js @@ -118,12 +118,6 @@ const Modal = React.forwardRef(function Modal(props, forwardedRef) { return ( - {/* - * Marking an element with the role presentation indicates to assistive technology - * that this element should be ignored; it exists to support the web application and - * is not meant for humans to interact with directly. - * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - */} {!hideBackdrop ? : null} - {/* - * Marking an element with the role presentation indicates to assistive technology - * that this element should be ignored; it exists to support the web application and - * is not meant for humans to interact with directly. - * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - */} {!hideBackdrop ? : null} (function Modal< return ( - {/* - * Marking an element with the role presentation indicates to assistive technology - * that this element should be ignored; it exists to support the web application and - * is not meant for humans to interact with directly. - * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - */} {!hideBackdrop && BackdropComponent ? : null} - {/* - * Marking an element with the role presentation indicates to assistive technology - * that this element should be ignored; it exists to support the web application and - * is not meant for humans to interact with directly. - * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - */} {!hideBackdrop ? : null} - {/* - * Marking an element with the role presentation indicates to assistive technology - * that this element should be ignored; it exists to support the web application and - * is not meant for humans to interact with directly. - * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - */} {!hideBackdrop ? : null} - {/* - * Marking an element with the role presentation indicates to assistive technology - * that this element should be ignored; it exists to support the web application and - * is not meant for humans to interact with directly. - * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - */} {!hideBackdrop && BackdropComponent ? ( diff --git a/packages/mui-material/src/Modal/useModal.ts b/packages/mui-material/src/Modal/useModal.ts index 9aca8a03c46a18..4cb2b992beae60 100644 --- a/packages/mui-material/src/Modal/useModal.ts +++ b/packages/mui-material/src/Modal/useModal.ts @@ -179,6 +179,12 @@ function useModal(parameters: UseModalParameters): UseModalReturnValue { }; return { + /* + * Marking an element with the role presentation indicates to assistive technology + * that this element should be ignored; it exists to support the web application and + * is not meant for humans to interact with directly. + * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md + */ role: 'presentation', ...externalEventHandlers, onKeyDown: createHandleKeyDown(externalEventHandlers),