USWDS: Replaced deprecated xlink:href code with recommended use of href#6165
Conversation
mahoneycm
left a comment
There was a problem hiding this comment.
Small changes requested.
Also, do you know if we're safe to remove xmlns:xlink from the svg's as well? Or do we need to keep them?
amyleadem
left a comment
There was a problem hiding this comment.
This looks good. Thanks!
I successfully performed the following tests:
- Confirm all
xlink:hrefreferences have been updated tohref - Confirm icons still display as expected in Safari, Firefox, Chrome
Can you add a changelog PR for this change?
Additionally, can you update the PR description by adding a "Markup change" section with a note that says users should update their xlink:href references to href?
mejiaj
left a comment
There was a problem hiding this comment.
Looks good overall, a few minor comments.
mejiaj
left a comment
There was a problem hiding this comment.
@RachelCorsino some small issues related to previous merge conflicts. Can you take a look? Please reach out if anything is unclear.
eefebe2 to
bc7db26
Compare
mejiaj
left a comment
There was a problem hiding this comment.
LGTM, added video showing the loader icon to confirm there aren't regressions.
There was a problem hiding this comment.
No regressions found, sharing for awareness.
loader-icon-2024-11-12.at.9.51.13.AM.mov
mahoneycm
left a comment
There was a problem hiding this comment.
LGTM! Thanks @RachelCorsino !
Summary
All
xlink:hrefinstances have be replaced withhrefwithin the repo in order to account for the deprecation ofxlink:href.Breaking change
Indicate if this update is a breaking change with one of the following statements:
This is not a breaking change.
Related issue
Closes #6088
Related pull requests
USWDS-Site: Replaced deprecated xlink:href code with recommended use of href #2926
Preview link
Preview link:
USWDS Storybook Icon
Problem statement
The USWDS repository currently contains numerous instances of xlink:href, which is a deprecated attribute that may cause compatibility issues/errors.
Solution
The USWDSrepository has been updated to use the
hrefattribute instead of the deprecatedxlink:hrefattribute.Markup Change
Users should update their
xlink:hrefreferences to href.Testing and review
<use>no longer usesxlink:hrefand useshrefinstead when inspecting an icon