Skip to content

[material-ui] Component implementation consistency #49337

Open

Description

@Janpot

Important

This list has not been extensively groomed, if you implement items from it be aware that "finding out whether the change makes sense in the first place" is still part of the effort. Make sure to motivate well why a change makes the library more consistent and be prepared the PR may be closed without merging.

A review of all @mui/material components for implementation consistency: places where a component handles a shared concern (slots, theming, refs, events, types) differently from the rest of the package. Most of the package follows one pattern; the items below are the outliers. Many are real bugs, the rest are API inconsistencies that need a decision first.

Bugs

Slots

Shared props

Events

Types

Activity

  1. added
    umbrella
    package: material-ui
    on Oct 7, 2026
  2. albinjiji commented on Nov 9, 2026

    @albinjiji
    Contributor

    Hi, I'd like to take one item from this list: "SpeedDial builds DOM ids from ariaLabel instead of useId". I won't touch the other items.

    Repro: two SpeedDials with the same ariaLabel on one page: https://codesandbox.io/p/sandbox/basic-forked-nws77m

    Running this in the console:

    [...document.querySelectorAll('[aria-controls]')].map(b => ({
      controls: b.getAttribute('aria-controls'),
      matches: document.querySelectorAll('#' + b.getAttribute('aria-controls')).length,
    }))

    returns controls: "SpeedDialbasicexample-actions" and matches: 2 for both fabs, so the id is duplicated in the DOM and each aria-controls is ambiguous.

    Image

    Cause: in packages/mui-material/src/SpeedDial/SpeedDial.js, const id = ariaLabel.replace(/^[^a-z]+|[^\w:.-]+/gi, '') feeds the fab's aria-controls, the actions container id, and each action's id.

    This is a visible API change. SpeedDial.d.ts documents ariaLabel as "also used to provide the id for the SpeedDial element and its children", so users may rely on ids like mySpeedDial-actions. Which direction do you prefer?

    • A. Always use useId and update the docs. The id format changes, so it needs a major release.
    • B. Use the existing id prop (currently applied only to the root element) as the base for the generated ids when provided, and default to a useId-based id when it's omitted.
    • C. Keep label-derived ids and only fix collisions (non-breaking).

    If someone is already working on this item, let me know.

  3. Janpot commented on Nov 9, 2026

    @Janpot
    MemberAuthor

    👍 B makes most sense and is in line with other components

  4. albinjiji commented on Nov 9, 2026

    @albinjiji
    Contributor

    Thanks, I went with B. PR #49729

  5. albinjiji commented on Nov 18, 2026

    @albinjiji
    Contributor

    I'd like to take "Drawer: remove ModalProps in favor of slotProps.root" and won't touch the other items. ModalProps isn't currently marked @deprecated, so would you like it removed outright in v10 (with a migration note), or deprecated first? Plan: forward the behavior through slotProps.root, merge slotProps.backdrop with the Drawer's own backdrop props, add tests, and update the v10 migration guide.

  6. Janpot commented on Nov 18, 2026

    @Janpot
    MemberAuthor

    so would you like it removed outright in v10 (with a migration note), or deprecated first?

    Deprecated in v9 (PR against the v9.x branch), removed in v10 (PR against master)

  7. albinjiji commented on Nov 18, 2026

    @albinjiji
    Contributor

    Got it. I'll open the deprecation PR against v9.x first, then the removal PR against master.

  8. albinjiji commented on Nov 19, 2026

    @albinjiji
    Contributor

    Opened the deprecation PR against v9.x: #49844. I'll follow with the removal PR against master once this is merged.

  9. albinjiji commented on Nov 26, 2026

    @albinjiji
    Contributor

    Opened the v10 removal PR: #49930 (follows the deprecation in #49844).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: material-uiumbrella

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions