Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core][modal] Fix comment location #44026

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading