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

Label as separate React component #1107

Closed
mimarz opened this issue Feb 9, 2021 · 6 comments
Closed

Label as separate React component #1107

mimarz opened this issue Feb 9, 2021 · 6 comments
Assignees
Labels
core-react eds-core-react

Comments

@mimarz
Copy link
Contributor

mimarz commented Feb 9, 2021

notes #1015

@wenche
Copy link
Contributor

wenche commented Feb 9, 2021

Add an example in Storybook about aria-label for TextField without visible label

@wenche
Copy link
Contributor

wenche commented Feb 9, 2021

One obvious shortcoming of the current Label component @mimarz is that you can't use it to wrap an input component.

<label>
  <input>
</label>

I don't know if we should fix this as well or delay this? 🤔

@mimarz
Copy link
Contributor Author

mimarz commented Feb 9, 2021

One obvious shortcoming of the current Label component @mimarz is that you can't use it to wrap an input component.

<label>
  <input>
</label>

I don't know if we should fix this as well or delay this? 🤔

Don't we put children inside a label element inside Label? 😅

@wenche
Copy link
Contributor

wenche commented Feb 9, 2021

Nope, only the label text and meta

@wenche
Copy link
Contributor

wenche commented Feb 9, 2021

I think my vote goes to fix it (if it's a low hanging fruit). If we are supposed to reuse the <Label> component for selection controls we're gonna need it anyway 🤷‍♀️

@wenche
Copy link
Contributor

wenche commented Feb 10, 2021

It was not a low hanging fruit, more like in the middle of the tree or something 😓 Beyond adding the children we need to rethink the styling. My suggestion would be to keep it like this for now, and attach the problem more holistically when we do the selection controls.

@wenche wenche self-assigned this Feb 10, 2021
@wenche wenche added the core-react eds-core-react label Feb 10, 2021
@wenche wenche closed this as completed Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-react eds-core-react
Projects
None yet
Development

No branches or pull requests

2 participants