HTML5 - Validation Messages

Which element should be used to display verification messages (errors) to the user? Which one is more semantic in HTML5?

+3
source share
3 answers

You might consider adding an ARIA role for "alert" or "status." I don’t think that semantically any of the HTML elements is better than<div class="error">

+3
source

I would use javascript to display a javascript error window containing erro (s).

EDIT: For server-side validation, we use <div>one that populates after an ajax call.

0
source

div error notice, .

0

Source: https://habr.com/ru/post/1767541/


All Articles