Skip to content

USWDS - Place-Icon() defaults & WHC themes for Accordion, Banner, Search, and Header#4604

Merged
mejiaj merged 10 commits into
cm-high-contrast-a11yfrom
cm-hc-accordion-banner-header
Mar 25, 2022
Merged

USWDS - Place-Icon() defaults & WHC themes for Accordion, Banner, Search, and Header#4604
mejiaj merged 10 commits into
cm-high-contrast-a11yfrom
cm-hc-accordion-banner-header

Conversation

@mahoneycm

@mahoneycm mahoneycm commented Mar 24, 2022

Copy link
Copy Markdown
Contributor

Previews:

Accordion →
Banner →
Search →
Header →

Description

Previous WHC work caused conflicting styles due to the scope of the accordion component. To avoid this we set Accordion forced-color-adjust: none which allowed us to keep the standard styles that are already color contrast compliant.

This PR also sets defaults for the place-icon() function for easier implementation and less redundancy in the code.

Accordion

Accordion was missing the icons which implied there was collapsed content hidden.

Current High Contrast / High Contrast Fix: Dark Theme / High Contrast Fix: Light Theme
image

Banner

The banner was missing chevrons, which implies there is content hidden behind the link. It was also missing the close icon on mobile which allows users to close the pane.

Current High Contrast / High Contrast FIx
image

Search

The search component was missing the button outline as well as the magnifying glass icon in high contrast modes.

Current High Contrast / High Contrast Fix
image

Header

The header would be missing chevrons, mobile open and close buttons, and the search button depending on theme color

image

Mobile
image

Include any of the following (as necessary):

  • Relevant research and support documents
  • Type of content review needed: stylistic or copy editing
  • Screenshot images
  • Notes

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.

@mahoneycm mahoneycm requested a review from mejiaj March 24, 2022 20:19

@mejiaj mejiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice changes! Just a few minor things.

Please make sure you delete any commented code before PR.

The banner text Here's how you know is one color on mobile and another on desktop. Let's make it consistent.

Banner_.Default._.U.S.Web.Design.System.v2.13.2.and.2.more.pages.-.Work.-.Microsoft.Edge.Beta.2022-03-25.11-21-21.mp4

Comment thread src/stylesheets/components/_banner.scss
@mahoneycm mahoneycm requested review from amyleadem and mejiaj March 25, 2022 17:38

@mejiaj mejiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks Charlie!

@mejiaj mejiaj requested a review from thisisdano March 25, 2022 18:28
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.

2 participants