We expect the screen reader to announce "an item is closed" after the node is closed. Interestingly, NVDA on Chrome announces it properly, while Android and iOS Voice Over fail to announce this message.
Here's typescript code:
@HostListener('keydown.tab', ['$event'])
removeFilterMsg() {
const $message = document.createElement('span');
$message.classList.add('RemoveFilter');
$message.setAttribute('aria-live', 'assertive');
$message.setAttribute('display', 'none');
window.setTimeout(() => {
$message.innerHTML = "Filter item is removed";
}, 100);
document.body.appendChild($message);
}
The html code that triggers the above function is:
<button attr.aria-label="School Name" class="active-node" title="School Name">
School Name
<span style="color:white;font-size:20px;cursor:pointer;" aria-hidden="true" (click)="removeFilterMsg()"></span>
</button>
and this code will generate a span section at the bottom of the body.
<span class="RemoveFilter" aria-live="assertive" display="none">Filter item is removed</span>
Does anyone know what is the issue?