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

Empty link text #60

Closed
tricinel opened this issue Oct 6, 2020 · 5 comments
Closed

Empty link text #60

tricinel opened this issue Oct 6, 2020 · 5 comments
Labels
a11y feature New feature or request for an a11y check duplicate This issue or pull request already exists

Comments

@tricinel
Copy link
Contributor

tricinel commented Oct 6, 2020

Describe the new a11y feature or project enhancement

Anchor tags that are missing link text should probably be highlighted. I think the same could apply for buttons. It's not common, but it happened to me with frameworks where the property being accessed to display the link text was missing or came in as an empty string from the db. The linter won't catch this since <a href="">{{ title }}</a> is valid, but the output <a href=""></a> is not :)

Describe the solution you'd like

A quick code pen: https://codepen.io/tricinel/pen/gOMYBWx

Link(s)

@alvaromontoro
Copy link
Contributor

This looks like #34 (I should have made it clearer and separate button/a requests.)

There is one case in which <a> can be empty and still be valid: when used as an anchor instead of a link:

<a name="deep-link"></a>

The selector from the demo would need to be adjusted slightly to only select the anchors that have an href attribute.

@tricinel
Copy link
Contributor Author

tricinel commented Oct 6, 2020

Ah great, sorry, I missed that one :) That looks like it gathered more attention too, so I'd be more than happy to close this. Would be happy to do it by the way.

@jackdomleo7 jackdomleo7 added the duplicate This issue or pull request already exists label Oct 7, 2020
@jackdomleo7
Copy link
Owner

No worries, but good to see we're all thinking alike 😊

Closing since this is a duplicate of #34.

@jackdomleo7 jackdomleo7 added the a11y feature New feature or request for an a11y check label Oct 7, 2020
@tricinel
Copy link
Contributor Author

tricinel commented Oct 7, 2020

@jackdomleo7 yep, sounds good. Is #34 up for grabs?

@jackdomleo7
Copy link
Owner

@tricinel Sure, comment on #34 so I can assign you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y feature New feature or request for an a11y check duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants