ffoodd / a11y.css

This CSS file intends to warn developers about possible risks and mistakes that exist in HTML code. It can also be used to roughly evaluate a site's quality by simply including it as an external stylesheet.
https://ffoodd.github.io/a11y.css
MIT License
1.48k stars 92 forks source link

Check if anchor exists in targetted link #467

Closed ffoodd closed 1 year ago

ffoodd commented 1 year ago

After #465, it's obvious Linkinator is not enough to ensure links aren't dead: it doesn't handle anchors.

Is there a way to check that an anchor exists in the target's DOM, or would it need a custom Node script to fetch content and check after that?

PhilippeVay commented 1 year ago

From feature request JustinBeckwith/linkinator/issues/79 => commercetools/commercetools-docs-kit/issues/1185#issuecomment-1029917832

Dart "linkcheck" (fast native binary, does have support for checking missing anchors, is a github action, not as flexible as linkinator concerning rewriting staging URLs)

seems to be interesting. Though... - I've 0 experience with GitHub Actions - that could be a problem:

What is not supported by "linkcheck" is rewriting the hosts on our staging domain. This might be the blocker.

ffoodd commented 1 year ago

I'll have a look, thanks for the link!