Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render all valid attributes on all components #2126

Open
Josh68 opened this issue Sep 12, 2022 · 1 comment
Open

Render all valid attributes on all components #2126

Josh68 opened this issue Sep 12, 2022 · 1 comment

Comments

@Josh68
Copy link
Collaborator

Josh68 commented Sep 12, 2022

Describe the bug
Not all components render standard element props / attributes on their top-level element

Reference earlier ticket

To Reproduce
Steps to reproduce the behavior:

  1. See the code for Card (MGov)
  2. Note that the only props allowed to be passed to the component are className and children
  3. Create a page and render a Card adding a data-testid attribute
  4. Note that this is a valid prop in React, as are all data- attributes (also aria- attributes, e.g.)
  5. Note that this attribute isn't rendered

Expected behavior
All components should take valid props (aka HTML attributes, including all data- attributes) for their top-level element and render them on the top-level element unless otherwise specified

Example: Alert:

Takes correct props

Renders all props

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [Mac OS]
  • Browser [Chrome]
  • Version [105.0.5195.102]

Additional context
Add any other context about the problem here.

@zarahzachz
Copy link
Collaborator

The engineers are discussing this issue now. Will keep you posted with what we discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants