I'm working on making a dynamic web application accessible to the visually impaired via screen readers, and I'm running into an annoying problem. When I test my code (see below) with JAWS, it works perfectly fine. But when I use NVDA, I'm getting the dynamically-added content is being read TWICE by this reader in Firefox, and not being read at all in IE9.
Has anyone ever seen this kind of behavior before?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Mike's Alert Test Page</TITLE>
</HEAD>
<BODY>
<script type="text/javascript">
function simulateErrors()
{
var elem = document.getElementById("inlineErrors");
if (elem != null && elem != undefined) {
elem.innerHTML = '<DIV role="alert">I am some alert text.</DIV>';
}
}
</script>
<H1>Test Page</H1>
<DIV ID="inlineErrors" role="none"></DIV>
<DIV ID="buttons">
<!--<BUTTON onClick="simulateErrors()" type="button">Simulate Errors</BUTTON>-->
<input type="submit" value="Simulate Errors" onClick="simulateErrors()"/>
</DIV>
</BODY>