-
Notifications
You must be signed in to change notification settings - Fork 81
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
fix!: Unify icon usage #2411
fix!: Unify icon usage #2411
Conversation
There's some Happo diffs, in particular SocialLinks which I think needs adjustment before merge: The icon used in the Since this PR removes a consumer-facing component, it'll be a breaking change. Nothing to worry about with that, but you should update the title to add a |
@brandonlenz are Happo diffs approvable? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left a question but it's not blocking.
@@ -40,7 +40,9 @@ describe('SocialLinks component', () => { | |||
describe('SocialLink component', () => { | |||
it('renders without errors', () => { | |||
const { container } = render(<SocialLink name="Instagram" />) | |||
expect(container.querySelector('.usa-social-link')).toBeInTheDocument() | |||
expect(screen.getByRole('img')).toHaveAttribute('alt', 'Instagram') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Should these have alt tags too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the alt
prop only applies to <img>
. Now that it's an <svg>
, I have a line at the bottom of that block to check the name
prop instead, which serves the same purpose.
Summary
Addresses these two ACs in the original issue:
Related Issues or PRs
Resolves #1303
How To Test
Confirm that all SVGs still in use are for images that aren't icons
Screenshots (optional)
N/A, looks the same visually, and behaves the same with some attribute changes