Skip to content

[EuiModal] Wrap EuiModalHeaderTitle in H1 unless an escape hatch prop is passed #6531

@1Copenut

Description

@1Copenut

Description

We've had a few reports of Kibana modal headers that have stopped rendering a proper H1 title. This regression is related to the following items:

During a Slack discussion with @cee-chen and @jen-huang we determined it would be worthwhile to automatically wrap the children prop with an H1 tag unless developers passed an escape hatch prop to render children exactly as they've written it.

WCAG guidance

Tasks

  • Write an escape hatch prop to add to EuiModalHeaderTitle logic for overriding the H1 wrapper for children
  • Add unit tests to evaluate standard modal, confirmation modal with and without H1 wrapper
  • Update the Confirm Modal documentation to provide awareness of this logic

Kibana confirmation modals with H1 not rendered
image


EUI Docs for Confirmation Modal
Screen Shot 2023-01-17 at 4 14 06 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitybreaking changePRs with breaking changes. (Don't delete - used for automation)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions