Forms · 17
Prepare live regions before updates
A live region can announce inserted text only when its container already exists for assistive technology.
What to do
- Add an initially empty role="status" region with id="status-message".
- Add an initially empty role="alert" region with id="alert-message".
- Keep both containers in place while the preview inserts routine and urgent messages.
Result
Run the checks
Edit the HTML and select “Check solution”. The preview updates automatically.
If you are stuck
Create empty live-region elements in the original HTML. Do not create or replace them only after a button click.