Visitar URL original
USWDS - Search: Use inline image for Search icon by mejiaj · Pull Request #4274 · uswds/uswds · GitHub
Skip to content

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

Merged
thisisdano merged 1 commit into
developfrom
jm-a11y-search-icon
Dec 9, 2021
Merged

thisisdano merged 1 commit into
developfrom
jm-a11y-search-icon

Conversation

@mejiaj

@mejiaj mejiaj commented Jul 21, 2021 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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