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

Badge: Improve visual appearance and accessibility, simplify markup #251

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

aduth
Copy link
Member

@aduth aduth commented Sep 17, 2021

Before After
image image

**Why**:

- Improved vertical centering
- Removed unused ID attribute
- Removed unnecessary `<span>` child to simplify markup and improve performance in deeply-nested markup documents
- Set null icon alt to treat as decorative / redundant, based on adjacent text providing the same information.
- Remove broken responsive styling
}
}

@media #{$theme-site-margins-breakpoint} {
Copy link
Member Author

Choose a reason for hiding this comment

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

$theme-site-margins-breakpoint comes from USWDS and is equal to the string value "desktop" (source). @media desktop { is not a valid media query. This would have needed to use the at-media mixin to do anything. Based on the styles, I'm assuming this is meant to address some of the IdP-specific styling of verification badges as right-aligned on the account page at desktop viewports. Since it's project-specific, I don't think it's appropriate to keep.

@aduth
Copy link
Member Author

aduth commented Sep 17, 2021

Test failure is for visual regression, and is expected based on how the icon placement has been adjusted slightly to improve vertical centering:

image

@aduth aduth merged commit 606d2cd into main Sep 17, 2021
@aduth aduth deleted the aduth-badge-simplify branch September 17, 2021 17:23
@aduth aduth mentioned this pull request Sep 30, 2021
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