hypra

ATTR-001: unknown attribute

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

Hypra knows the attributes of every HTML element. One it doesn't know is most likely a typo, which a browser would silently ignore, so it's written as-is with a warning. Attributes with a dash, like data-*, aria-*, hx-* or x-*, pass without one.

Fails

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  a("/sale", tagret: "_blank") "Sale"
}
warning[ATTR-001]: `a` has no attribute `tagret`, so it's written as-is
 --> page.hypra:3:14
  |
3 |   a("/sale", tagret: "_blank") "Sale"
  |              ^^^^^^
  = help: did you mean `target`? If not, quote the name: "tagret": ...
  = docs: https://hypralang.dev/rules/attr-001/

0 errors, 1 warning

Fixed

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  a("/sale", target: "_blank") "Sale"
  div("popovertarget-id": "cart") "Cart"
}

To write an attribute Hypra doesn't know on purpose, quote its name. A near miss of one of Hypra's own settings, like titel on a page, is an error instead: the setting would be lost.