In order to bring this div in focus regardless of the screen reader being used, explicitly set the focus to it:
$('#errormessages').show().focus();
Question
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();
Solution
In order to bring this div in focus regardless of the screen reader being used, explicitly set the focus to it:
$('#errormessages').show().focus();