Currently, the DialogContent component is hard-coded to render an h2 element. This seems semantically incorrect based on its name, and because there is already a DialogTitle component which is also hard-coded to render an h2.
I think it'd be more appropriate for DialogTitle to accept a prop that determines what type of element it should render and for DialogContent to instead render a div (or also take a prop that determines the element it renders). This is because, if the dialog is intended to be rendered as a subsection of a section that is headed by h3 (or any other heading level > than h2), rendering h2 in the dialog subsection, as DialogTitle currently does, is semantically incorrect.
Currently, the
DialogContentcomponent is hard-coded to render anh2element. This seems semantically incorrect based on its name, and because there is already aDialogTitlecomponent which is also hard-coded to render anh2.I think it'd be more appropriate for
DialogTitleto accept a prop that determines what type of element it should render and forDialogContentto instead render adiv(or also take a prop that determines the element it renders). This is because, if the dialog is intended to be rendered as a subsection of a section that is headed byh3(or any other heading level > thanh2), renderingh2in the dialog subsection, asDialogTitlecurrently does, is semantically incorrect.