Skip to content

DialogContent shouldn't be rendering h2 and DialogTitle also probably shouldn't necessarily either #444

Description

@nothingnesses

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions