I have a search form. When user submits form, ajax request is sent to the server. When the response comes, I update found items count value, but JAWS reads previous items count value. To get JAWS read new content I use aria attributes and role="status". But JAWS still doesn't work as expected.
What I've tried: Getting screen reader to read new content added with JavaScript, aria-live and JAWS, ARIA Live Regions and etc.
What am I doing wrong?
HTML
<form class="search-form">
<label class="keyword-search-input-label" for="keyword-search-input">
<span class="hide">Search</span>
<input class="form-control" type="text" id="keyword-search-input" name="keyword"/>
</label>
<button id="clear-field-button" type="reset">
<span class="hide">Clear Search Field</span>
</button>
<button id="search-button" type="submit" aria-describedby="number-found-items">
<span class="symbol-label">Search</span>
</button>
</form>
<div id="number-found-items" role="status" aria-live="assertive" aria-atomic="true" aria-relevant="all">
<span id="number-found">0</span>
items found
</div>
JS
function updateNumberFound(value) {
$numberFound.text(value || 0);
}
jsFiddle To reproduce the problem try to focus on search input, type some text and press search button, while JAWS is on.