Skip to content

[Dialog] The h6 DialogTitle class is applied to dialog titles instead of h2 #26386

Description

@Anna-log7

The documentation and code both indicate that an h2 should be the default variant for DialogTitle, but the h6 class is applied.
This line of code has the component set to h2, but the variant set as h6.

https://github.com/mui-org/material-ui/blob/7df94e4235fc6fc98ec7c13710be45bdbbd86dbe/packages/material-ui/src/DialogTitle/DialogTitle.js#L24

This results in <h2 class="MuiTypography-root MuiTypography-h6"></h2>

Also see this related closed issue: #16569

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

.MuiTypography-h6 class is set on the DialogTitle

Expected Behavior 🤔

.MuiTypography-h2 class should be set on the DialogTitle

Steps to Reproduce 🕹

https://codesandbox.io/s/h6-bug-323pj?file=/demo.js

Context 🔦

Our h6 styling is much smaller causing the dialog titles to not stand out as expected.

Your Environment 🌎

`npx @material-ui/envinfo`
  System:
    OS: Linux 3.10 CentOS Linux 7 (Core)
  Binaries:
    Node: 12.20.1 - ~/.nvm/versions/node/v12.20.1/bin/node
    Yarn: Not Found
    npm: 6.14.10 - ~/.nvm/versions/node/v12.20.1/bin/npm
  Browsers:
    Chrome: 90.0.4430.72
    Firefox: 88.0
  npmPackages:
    @material-ui/core: ~4.11.3 => 4.11.3 
    @material-ui/icons: ~4.5.1 => 4.5.1 
    @material-ui/lab: ~4.0.0-alpha.44 => 4.0.0-alpha.44 
    @material-ui/styles: ~4.9.13 => 4.9.13 
    @material-ui/system:  4.11.3 
    @material-ui/types:  5.1.0 
    @material-ui/utils:  4.7.1 
    @types/react: ~16.9.47 => 16.9.47 
    react: ~16.9.0 => 16.9.0 
    react-dom: ~16.9.0 => 16.9.0 
    typescript: ~4.0.2 => 4.0.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    design: materialThis is about Material Design, please involve a visual or UX designer in the processscope: dialogChanges related to the dialog.support: questionCommunity support but can be turned into an improvement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions