Question · Angular course · Module 12: Security and Performance
The role="alert" role
What effect does role="alert" have on an element with a form error message?
Answer options
- It displays a native browser popup
- It makes the screen reader immediately announce the message that appears
- It blocks form submission
- It adds a red border to the field
You can check the correct answer by solving this task in the CodeWorlds game.