Skip to content

Commit

Permalink
[modal] Fix comment location (#44026)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 6, 2024
1 parent 860ccd0 commit e5b81c8
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 36 deletions.
6 changes: 0 additions & 6 deletions docs/data/base/components/modal/UseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ const Modal = React.forwardRef(function Modal(props, forwardedRef) {

return (
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
{/*
* 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
*/}
<CustomModalRoot {...rootProps}>
{!hideBackdrop ? <CustomModalBackdrop {...backdropProps} /> : null}
<FocusTrap
Expand Down
6 changes: 0 additions & 6 deletions docs/data/base/components/modal/UseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ const Modal = React.forwardRef(function Modal(

return (
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
{/*
* 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
*/}
<CustomModalRoot {...rootProps}>
{!hideBackdrop ? <CustomModalBackdrop {...backdropProps} /> : null}
<FocusTrap
Expand Down
6 changes: 0 additions & 6 deletions packages/mui-base/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,6 @@ const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal<

return (
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
{/*
* 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
*/}
<Root {...rootProps}>
{!hideBackdrop && BackdropComponent ? <BackdropComponent {...backdropProps} /> : null}
<FocusTrap
Expand Down
6 changes: 6 additions & 0 deletions packages/mui-base/src/unstable_useModal/useModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ export 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),
Expand Down
6 changes: 0 additions & 6 deletions packages/mui-joy/src/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@ const Drawer = React.forwardRef(function Drawer(inProps, ref) {
<ModalDialogSizeContext.Provider value={size}>
<ModalDialogVariantColorContext.Provider value={contextValue}>
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
{/*
* 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
*/}
<SlotRoot {...rootProps}>
{!hideBackdrop ? <SlotBackdrop {...backdropProps} /> : null}
<FocusTrap
Expand Down
6 changes: 0 additions & 6 deletions packages/mui-joy/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ const Modal = React.forwardRef(function Modal(inProps, ref) {
return (
<CloseModalContext.Provider value={onClose}>
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
{/*
* 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
*/}
<SlotRoot {...rootProps}>
{!hideBackdrop ? <SlotBackdrop {...backdropProps} /> : null}
<FocusTrap
Expand Down
6 changes: 0 additions & 6 deletions packages/mui-material/src/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,6 @@ const Modal = React.forwardRef(function Modal(inProps, ref) {

return (
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
{/*
* 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
*/}
<RootSlot {...rootProps}>
{!hideBackdrop && BackdropComponent ? (
<BackdropSlot {...backdropProps} ref={backdropRef} />
Expand Down
6 changes: 6 additions & 0 deletions packages/mui-material/src/Modal/useModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit e5b81c8

Please sign in to comment.