Skip to content

Commit e5b81c8

Browse files
[modal] Fix comment location (#44026)
1 parent 860ccd0 commit e5b81c8

File tree

8 files changed

+12
-36
lines changed

8 files changed

+12
-36
lines changed

docs/data/base/components/modal/UseModal.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@ const Modal = React.forwardRef(function Modal(props, forwardedRef) {
118118

119119
return (
120120
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
121-
{/*
122-
* Marking an element with the role presentation indicates to assistive technology
123-
* that this element should be ignored; it exists to support the web application and
124-
* is not meant for humans to interact with directly.
125-
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
126-
*/}
127121
<CustomModalRoot {...rootProps}>
128122
{!hideBackdrop ? <CustomModalBackdrop {...backdropProps} /> : null}
129123
<FocusTrap

docs/data/base/components/modal/UseModal.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ const Modal = React.forwardRef(function Modal(
142142

143143
return (
144144
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
145-
{/*
146-
* Marking an element with the role presentation indicates to assistive technology
147-
* that this element should be ignored; it exists to support the web application and
148-
* is not meant for humans to interact with directly.
149-
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
150-
*/}
151145
<CustomModalRoot {...rootProps}>
152146
{!hideBackdrop ? <CustomModalBackdrop {...backdropProps} /> : null}
153147
<FocusTrap

packages/mui-base/src/Modal/Modal.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,6 @@ const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal<
157157

158158
return (
159159
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
160-
{/*
161-
* Marking an element with the role presentation indicates to assistive technology
162-
* that this element should be ignored; it exists to support the web application and
163-
* is not meant for humans to interact with directly.
164-
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
165-
*/}
166160
<Root {...rootProps}>
167161
{!hideBackdrop && BackdropComponent ? <BackdropComponent {...backdropProps} /> : null}
168162
<FocusTrap

packages/mui-base/src/unstable_useModal/useModal.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ export function useModal(parameters: UseModalParameters): UseModalReturnValue {
180180
};
181181

182182
return {
183+
/*
184+
* Marking an element with the role presentation indicates to assistive technology
185+
* that this element should be ignored; it exists to support the web application and
186+
* is not meant for humans to interact with directly.
187+
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
188+
*/
183189
role: 'presentation',
184190
...externalEventHandlers,
185191
onKeyDown: createHandleKeyDown(externalEventHandlers),

packages/mui-joy/src/Drawer/Drawer.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,6 @@ const Drawer = React.forwardRef(function Drawer(inProps, ref) {
245245
<ModalDialogSizeContext.Provider value={size}>
246246
<ModalDialogVariantColorContext.Provider value={contextValue}>
247247
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
248-
{/*
249-
* Marking an element with the role presentation indicates to assistive technology
250-
* that this element should be ignored; it exists to support the web application and
251-
* is not meant for humans to interact with directly.
252-
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
253-
*/}
254248
<SlotRoot {...rootProps}>
255249
{!hideBackdrop ? <SlotBackdrop {...backdropProps} /> : null}
256250
<FocusTrap

packages/mui-joy/src/Modal/Modal.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,6 @@ const Modal = React.forwardRef(function Modal(inProps, ref) {
146146
return (
147147
<CloseModalContext.Provider value={onClose}>
148148
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
149-
{/*
150-
* Marking an element with the role presentation indicates to assistive technology
151-
* that this element should be ignored; it exists to support the web application and
152-
* is not meant for humans to interact with directly.
153-
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
154-
*/}
155149
<SlotRoot {...rootProps}>
156150
{!hideBackdrop ? <SlotBackdrop {...backdropProps} /> : null}
157151
<FocusTrap

packages/mui-material/src/Modal/Modal.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,6 @@ const Modal = React.forwardRef(function Modal(inProps, ref) {
213213

214214
return (
215215
<Portal ref={portalRef} container={container} disablePortal={disablePortal}>
216-
{/*
217-
* Marking an element with the role presentation indicates to assistive technology
218-
* that this element should be ignored; it exists to support the web application and
219-
* is not meant for humans to interact with directly.
220-
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
221-
*/}
222216
<RootSlot {...rootProps}>
223217
{!hideBackdrop && BackdropComponent ? (
224218
<BackdropSlot {...backdropProps} ref={backdropRef} />

packages/mui-material/src/Modal/useModal.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ function useModal(parameters: UseModalParameters): UseModalReturnValue {
179179
};
180180

181181
return {
182+
/*
183+
* Marking an element with the role presentation indicates to assistive technology
184+
* that this element should be ignored; it exists to support the web application and
185+
* is not meant for humans to interact with directly.
186+
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
187+
*/
182188
role: 'presentation',
183189
...externalEventHandlers,
184190
onKeyDown: createHandleKeyDown(externalEventHandlers),

0 commit comments

Comments
 (0)