In order to bring this div in focus regardless of the screen reader being used, explicitly set the focus to it:
$('#errormessages').show().focus();
質問
I am displaying a div section 'errormessages' (Attributes aria-live="rude" id="errormessages" tabindex="-1"
) in a page when any validation fails.
When tested with screen readers,
Kindly can anyone suggest improvements?
$('#errormessages').show();
解決
In order to bring this div in focus regardless of the screen reader being used, explicitly set the focus to it:
$('#errormessages').show().focus();