jargon

Frontend & browser·Accessibility and semantics

you pointed the dialog at the id of its own heading instead of repeating the text in an attribute.

aria-labelledby

An attribute naming an element by referencing the id of other elements whose text becomes the name. It beats `aria-label` in the precedence order and keeps the accessible name in sync with what is on screen, which is why it is preferred wherever visible text exists. It takes a list of ids and concatenates them, and a reference to a missing id fails silently.

Commonly confused with