Dynamic content and ARIA
Compute names and descriptions
Understand how text, labels, aria-label, aria-labelledby, and aria-describedby combine or override one another.
9 minute lesson
Start from the behavior you can observe. The registration button keeps its visible name while a description explains the cancellation deadline.
Accessible names identify controls; descriptions add supporting information, and careless ARIA can hide useful visible text. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.
It is tempting to add aria-label everywhere and accidentally replace clearer visible labels. That trades a clear decision for an assumption you will eventually have to debug. The stronger move is to prefer associated visible text, inspect the computed name, and add descriptions only for useful supplementary context. Make the boundary explicit in code and in the project notes.
Tie the decision back to the larger job: Use ARIA and dynamic announcements only where native HTML cannot express the required relationship or state. Record enough evidence that another developer can repeat the result without relying on your memory.
Inspect ten interactive elements and make every programmatic name match the visible intent. Repeat it once with an invalid or hostile condition and write down the boundary the failure revealed.
Lesson completed