Skip to content

Link underline rule should run on <a href> #341

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

Open
khiga8 opened this issue May 14, 2025 · 3 comments
Open

Link underline rule should run on <a href> #341

khiga8 opened this issue May 14, 2025 · 3 comments

Comments

@khiga8
Copy link
Contributor

khiga8 commented May 14, 2025

It'd be great if we could have the link underline rule run on plain old HTML anchor tags, in addition to <Link>

@sunnyi101
Copy link

@khiga8 is this something the a11y team can take on? CC: @helen. Primer does not not have any objection if the a11y team want to pick this up.

@TylerJDev
Copy link
Member

Hey @khiga8! I created a PR with Copilot, and was curious if this is what you envisioned. Basically, the suggestion is to utilize a PRC <Link> in cases where the a11y-link-in-text-block rule would be present.

Example:

<p>Please <a href="https://github.com">visit our site</a> for more information.</p>

The <a href> would cause the rule to throw an error. We could enhance this by possibly ignoring links with styles (class names), as there might be the possibility of an underline style being applied through that.

Let me know what you think! 😄

@khiga8
Copy link
Contributor Author

khiga8 commented May 23, 2025

Wow! Very cool @TylerJDev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants