HennepinCounty / ed-hcds-components

ed-hcds-components contains accessible code for building a user interface for Hennepin County digital products.
https://www.hennepin.us/design-system
MIT License
4 stars 0 forks source link

a11y updates for search component #6

Open SusannahHarris-HC opened 1 year ago

SusannahHarris-HC commented 1 year ago

There are a couple a11y fixes needed for the search component - see the USWDS component for guidance: <form class="usa-search" role="search"> <label class="usa-sr-only" for="search-field">Search</label> <input class="usa-input" id="search-field" type="search" name="search" /> <button class="usa-button" type="submit"> <span class="usa-search__submit-text">Search </span> <img src="/assets/img/usa-icons-bg/search--white.svg" class="usa-search__submit-icon" alt="Search"/> </button> </form>

JoeyPearlmanHennepin commented 1 year ago

Are we able to link to our Button component stylesheet instead of defining new buttons in the Search component's CSS?

https://github.com/HennepinCounty/ed-hcds-components/tree/main/buttons

  <button class="primary-idle">
            <svg class="closeIconWhite" ></svg>
            Button
        </button>

I think we would just need to swap out the icon for a magnifying glass and change the label to say "Search", no need to define new buttons.

SusannahHarris-HC commented 1 year ago

Sure, you're the designer so whatever works for you! Is the button for the search component in the stylesheet different from the button component style?

JoeyPearlmanHennepin commented 1 year ago

I met with TJ and he pushed an update, should be good for now! I think they were the same style but having it defined only once keeps things DRY and makes updates way easier. So if we needed to make a change to our Button styling it should cascade to the button for Search since they're the same component.

adeunjiHC commented 1 year ago

Pushed all the changes. Have a great day!

SusannahHarris-HC commented 1 year ago

Awesome, will QA and get back to you!