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

Make visually hidden render as span #344

Merged
merged 1 commit into from
Oct 30, 2019
Merged

Make visually hidden render as span #344

merged 1 commit into from
Oct 30, 2019

Conversation

qoalu
Copy link
Contributor

@qoalu qoalu commented Oct 29, 2019

Refer to SO question: https://stackoverflow.com/questions/12982269/is-it-semantically-incorrect-to-put-a-div-or-span-inside-of-a-button/12982334

This pull request:

  • Creates a new package
  • Fixes a bug in an existing package
  • Adds additional features/functionality to an existing package
  • Updates documentation or example code
  • Other

@chaance
Copy link
Member

chaance commented Oct 29, 2019

There are use cases outside of labeling buttons/links for visually hidden text, but point received. We should probably use an as prop to allow an easy override here either way.

@chaance chaance added the Type: Bug Something isn't working label Oct 29, 2019
@chaance
Copy link
Member

chaance commented Oct 29, 2019

@qoalu BTW, you'll need to add display: 'block' to the style object as well, since the properties used to hide the element won't have an effect on inline elements.

@chaance chaance merged commit ec433ec into reach:master Oct 30, 2019
@qoalu
Copy link
Contributor Author

qoalu commented Oct 30, 2019

thanks for the quick turnaround!

An "as" prop could be helpful, however this solution with span and display block should suffice for all use-cases.

@qoalu qoalu deleted the patch-1 branch October 30, 2019 13:23
@qoalu qoalu restored the patch-1 branch October 30, 2019 13:23
@qoalu qoalu deleted the patch-1 branch October 30, 2019 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants