문제

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,

  • JAWS 14: It reads the error messages displayed and the focus is set at the div section.
  • Windows Eye 8.3: It reads the error messages displayed, but the focus is not being set to the div section.

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();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top