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

USWDS - Search: Use inline image for Search icon #4274

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

mejiaj
Copy link
Contributor

@mejiaj mejiaj commented Jul 21, 2021

Preview

Description

Fixes #4272. The search icon has been converted from a background to an inline image. This is to ensure there's a text alternative should images fail to load.

⚠ Requires a markup change to Search component and/or header.

New markup

The new addition is the inline image for the search icon.

<img src="usa-icons-bg/search--white.svg" class="usa-search__submit-icon" alt="Search">

Default & Big search

<button class="usa-button" type="submit">    
  <span class="usa-search__submit-text">Search</span>    
  <img src="usa-icons-bg/search--white.svg" class="usa-search__submit-icon" alt="Search">
</button>

Small search

<button class="usa-button" type="submit">    
  <img src="usa-icons-bg/search--white.svg" class="usa-search__submit-icon" alt="Search">
</button>

Additional information

Related to issue #4207.

Before you hit Submit, make sure you’ve done whichever of these applies to you:

  • Follow the 18F Front End Coding Style Guide and Accessibility Guide.
  • Run npm test and make sure the tests for the files you have changed have passed.
  • Run your code through HTML_CodeSniffer and make sure it’s error free.
  • Title your pull request using this format: [Website] - [UI component]: Brief statement describing what this pull request solves.

@mejiaj mejiaj marked this pull request as ready for review July 22, 2021 13:39
@mejiaj mejiaj requested a review from thisisdano July 22, 2021 13:40
@thisisdano
Copy link
Member

LGTM. Holding to release with footer at the next minor (2.13)

@thisisdano thisisdano merged commit 16e1d74 into develop Dec 9, 2021
@thisisdano thisisdano deleted the jm-a11y-search-icon branch December 9, 2021 18:26
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

Successfully merging this pull request may close these issues.

Search Icon: use inline image
2 participants