Skip to content

Commit

Permalink
adds guidance for error summaries w/o focusable els (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrotti authored Dec 5, 2023
1 parent eb69615 commit b7de6e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/ui-patterns/forms/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ When the form fails validation, guide the user to the invalid inputs:
- The inline error message should be tied to each invalid input using `aria-describedby`
- If the inline error message is removed from the DOM, _also_ remove the `aria-describedby` attribute from the form input.

Live regions should not be used for form validation. Always use focus management (e.g. moving focus to the first link in the interactive summary, or the first invalid field), and appropriate markup to connect the error message to the field.
Live regions should not be used for form validation. Always use focus management (e.g. moving focus to the first link in the interactive summary, or the first invalid field), and appropriate markup to connect the error message to the field. If there are no focusable elements in the error summary banner, you may focus on the heading in the banner.

After a form has been submitted and failed validation, you may switch to inline validation to provide quicker feedback.

Expand Down

0 comments on commit b7de6e2

Please sign in to comment.