Accessible Error Summary Area
HTML
Hard
1 views
Problem Description
Create a simple area above a form to show errors using role='alert'.
Output Format
Print the HTML code.
Constraints
Use role alert. No JS needed.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
</head>
<body>
<div role='alert'>Please fix the errors below.</div>
<form action='#' method='post'>
<label>Email <input type='email' name='email' autocomplete='email' required></label>
<button type='submit'>Submit</button>
</form>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!