For accessibility purposes I need to make 'errors' that are displayed be read immediately after the page refreshes.
Currently I have role="alert" and tabindex="-1' on the div that contains the error. This works fine in Google Chrome, but it appears neither IE or Firefox support what I've done.
In Chrome the user is presented with a login page with both a username/password field. The user 'Submits' the form without filling out any information. The page refreshes with the error below and NVDA immediately reads the error. (I understand real time validation would be good, but that will be done at a later time)
<div id="notification_block">
<div class="alert alert-danger" role="alert" aria-labelledby="alertHeading" tabindex="-1">
<h2 id="alertHeading">Error: Login Failed</h2>
<div>Invalid username/password combination. Please verify that your information is correct.</div>
</div>
</div>
Any ideas how I can get this to work in IE and Firefox?