hypra

A11Y-007: link text doesn't say where it goes

Warning: the page still builds, but this is most likely a mistake.

Screen reader users often go through a list of a page's links, out of context. "Click here" and "read more" then say nothing. Search engines read link text too, to learn what the target page is about. (WCAG 2.4.4)

Fails

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  p { "Our sizes run small. " a("/sizes") "Click here" " for help." }
}
warning[A11Y-007]: link text `click here` doesn't say where it goes
 --> page.hypra:3:43
  |
3 |   p { "Our sizes run small. " a("/sizes") "Click here" " for help." }
  |                                           ^^^^^^^^^^^^
  = help: describe the target, e.g. a("/guide") "Read the setup guide"
  = docs: https://hypralang.dev/rules/a11y-007/

0 errors, 1 warning

Fixed

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  p { "Our sizes run small; the " a("/sizes") "size guide" " helps you pick." }
}

The words are checked in the page's language (lang): English, German, French, Spanish, Portuguese, Italian and Dutch, so "Hier klicken" is flagged on a German page. Pages in other languages aren't checked for them.