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
USWDS - Search: Use consistent search markup. #3327
Conversation
@thisisdano, looks like axe is complaining about the search component page where the variations are listed on the same page. I've tried adding them to their own iframe, but then axe doesn't test them. We could:
Happy to hear any other suggestions though. |
I think it is a best practice to put the I'll push this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Went back and reverted all the markup changes so we've focussed only on the styling here. I've added a new issue (#3344) that we can use for normalizing the markup. That work should go in the next minor version and this work could go in a |
src/components/search/search.njk
Outdated
<button class="usa-button" type="submit"> | ||
<span class="usa-search__submit-text">Search</span> | ||
</button> | ||
<div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the search role to the <form> and remove the redundant <div>
I know this is kinda ugly, but we introduced some inconsistent code into 2.5.0 and this ruleset needs to accomodate the pre-2.50, 2.5.0, and 2.6.0 markup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Search styles depend on
div[role="search"]
being a child of.usa-search
. Otherwise it breaks to next line on small screens.Additional information
Before you hit Submit, make sure you’ve done whichever of these applies to you:
npm test
and make sure the tests for the files you have changed have passed.