You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observe that the aria-labelledby attribute is not set on the list of a Menu component (element with role="menu".
Additionally, you can uncomment the lines that set the slotProps of the list as an object (in the theme) and observe that both the aria-labelledby of the theme and className of the component are merged.
When the object is used, the slotProps set on the component are merged with the slotProps of the theme. However, the function(al) slotProps of the theme is overridden entirely if the slotProps is set on the component.
This behavior is not ideal, as theme level customizations might be overridden unintentionally and pushes the theme customization towards the slots prop (when the ownerState is needed) - which is not ideal either, as it overrides MUI's default slots (usually just styling, but might include other functionality or internal components).
Expected behavior
(returned) Functional slotProps set via the defaultProps of a theme should be merged with slotProps set via the component.
Context
Working on a theme that customizes both the styling and semantics of MUI components - the ownerState is helpful to get the props passed in the component (or internal component state).
The usage is quite strange, since you're using the theme for non-theme use case. Not going to address, feel free to wrap the Menu and change it accordingly if you need it.
Why is this deemed a non-theme use-case? The theme allows customizing default props of a component or it's slots. There are two ways to customize slots: object or a function, I'm simply using the function.
EDIT: in our case we are trying to avoid wrapper components.
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
@GerardasB Thanks again for creating this issue! If you have a moment, we would love to hear your thoughts on how we handled it with this short feedback form.
Activity
silviuaavram commentedon Aug 4, 2026
The usage is quite strange, since you're using the theme for non-theme use case. Not going to address, feel free to wrap the
Menuand change it accordingly if you need it.GerardasB commentedon Aug 4, 2026
Why is this deemed a non-theme use-case? The theme allows customizing default props of a component or it's slots. There are two ways to customize slots: object or a function, I'm simply using the function.
EDIT: in our case we are trying to avoid wrapper components.
mnajdova commentedon Aug 12, 2026
I would consider this a bug. Why:
PR created - #48955
github-actions commentedon Aug 18, 2026
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
@GerardasB Thanks again for creating this issue! If you have a moment, we would love to hear your thoughts on how we handled it with this short feedback form.