Why this fires¶
TE744 is a high-confidence accessibility diagnostic. It currently covers missing image alternatives and interactive controls with no accessible name.
<img src="avatar.png" />
// error[TE744]: <img> needs an alt text alternativeFix it¶
Provide meaningful alt text, use alt="" for a decorative image, or name a control with visible text, a matching <label>, or an ARIA label.
TE744 only fires when the missing name is certain. Dynamic content such as
{label}, <children />, a nested component, or an HtmlAttrs spread may
provide the accessible name at runtime, so the component definition stays
clean.
For a reusable control that must always receive visible text, express that in
its API by making children required instead of defaulting it to empty:
fn Button(children: fn() -> View) -> View {
<button><children /></button>
}
<Button /> // error at this call site: required children are missingAlternatively, expose a required label: str prop and apply it with
aria-label={label}. Verniz does not guess through component boundaries: a
call-site diagnostic is emitted only when the component signature makes the
requirement explicit.