Thanks to visit codestin.com
Credit goes to github.com

Skip to content

USWDS - Bug: xlink:href deprecated #6088

@caseywatts

Description

@caseywatts

Describe the bug

Currently we recommend folks use xlink:href in the icon components.

The xlink:href attribute of the svg <use> directive is deprecated:
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

The switch is pretty straightforward - we should be able to switch references from xlink:href to just href and things will just work!

I ran into this when I was creating an icons web component using Lit, and I learned that Lit doesn't support xlink:href (because it's deprecated).

Steps to reproduce the bug

Find references to xlink:href in the repo, and update them:
https://github.com/search?q=repo%3Auswds%2Fuswds%20%22xlink%3Ahref%22&type=code

Expected Behavior

Expect no instances of xlink:href in the code

Related code

No response

Screenshots

No response

System setup

No response

Additional context

No response

Code of Conduct

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions