Skip to content

CardHeader level #492

Description

@Mottie

Describe the bug
While using the <CardHeader>, I noticed that a hard-coded h2 is rendered which is causing accessibility issues.

Please add a property that allows setting the header level.

And please include <CardHeader>, <CardMedia> and <CardFooter> in the storybook documentation.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the code
  2. Note that an h2 is hard-coded into the header

Expected behavior
A clear and concise description of what you expected to happen.

Add a property to allow customizing the header level

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] All
  • Browser [e.g. chrome, safari] All
  • Version [e.g. 22] All

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

See https://www.w3.org/WAI/WCAG22/Understanding/headings-and-labels.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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