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

fix(search): remove role attr and label from skeleton #4272

Merged
merged 7 commits into from
Oct 10, 2019
Merged

fix(search): remove role attr and label from skeleton #4272

merged 7 commits into from
Oct 10, 2019

Conversation

jendowns
Copy link
Contributor

@jendowns jendowns commented Oct 9, 2019

Closes #4179

Proposal to remove the role="search" attribute from this component and replace the label element with a simple span. My reasoning here is that there doesn't appear to be a real need for the role attribute and a label element since this is a non-interactive div. This would also remove the DAP violations.

Changelog

Changed

  • change label element to a span

Removed

  • remove role="search" attribute
  • remove htmlFor attribute

@jendowns jendowns requested a review from a team as a code owner October 9, 2019 15:04
@ghost ghost requested review from aledavila and vpicone October 9, 2019 15:04
@netlify
Copy link

netlify bot commented Oct 9, 2019

Deploy preview for carbon-components-react failed.

Built with commit dd01ff9

https://app.netlify.com/sites/carbon-components-react/deploys/5d9fa54cc219e20008c99e2c

@jendowns
Copy link
Contributor Author

jendowns commented Oct 9, 2019

Hey also, side note -- I noticed that this component is a class but maybe it doesn't need to be? I could do a quick little refactor to turn it into a simple functional component 🤔 Want me to do that in this PR?

@netlify
Copy link

netlify bot commented Oct 9, 2019

Deploy preview for carbon-elements ready!

Built with commit dd01ff9

https://deploy-preview-4272--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Oct 9, 2019

Deploy preview for the-carbon-components ready!

Built with commit dd01ff9

https://deploy-preview-4272--the-carbon-components.netlify.com

@emyarod
Copy link
Member

emyarod commented Oct 10, 2019

it looks good to go as-is but feel free to do the refactor in a separate PR if this gets merged in before you're able to push it and get re-reviews

Copy link
Contributor

@vpicone vpicone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you wanna make it a fc that'd be great! Thanks for the pr.

@jendowns
Copy link
Contributor Author

Thanks @emyarod & @vpicone! I just converted it into a functional component in my latest commit, if you don't mind taking another quick look.

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 🎉

@asudoh asudoh merged commit 0136897 into carbon-design-system:master Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AVT 1 Skeleton: Search has a DAP violation for missing unique search label and label w/ descriptive text
6 participants