mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Because we’re not showing a summary of error messages screen reader users might take a while to discover that there’s an error on the page. Since the only real action on a page with errors is to correct them this commit adds some Javascript to send focus straight to the first error message on a page.
6 lines
203 B
JavaScript
6 lines
203 B
JavaScript
$(() => GOVUK.modules.start());
|
|
|
|
$(() => new GOVUK.SelectionButtons('.block-label input, .sms-message-option input'));
|
|
|
|
$(() => $('.error-message').eq(0).parent('label').next('input').trigger('focus'));
|