From b7de6e2e5dc04303775ca07eb9a58bf22dcc95db Mon Sep 17 00:00:00 2001 From: Mike Perrotti Date: Tue, 5 Dec 2023 13:30:36 -0500 Subject: [PATCH] adds guidance for error summaries w/o focusable els (#689) --- content/ui-patterns/forms/overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ui-patterns/forms/overview.mdx b/content/ui-patterns/forms/overview.mdx index 01e913f3e..310bb7a13 100644 --- a/content/ui-patterns/forms/overview.mdx +++ b/content/ui-patterns/forms/overview.mdx @@ -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.