I have a requirement where NVDA screen reader should read the error messages (dynamically displayed) on the lwc. I have an array with list of error messages and used to display them. However these messages are never read by NVDA Speech viewer. I tried adding aria-hidden="true", aria-live="assertive" and role="alert" along with aria-atomic="true" to tag but none of them working. Unable to find the issue, can anyone please help? Here is the code:
<ul aria-live="assertive">
<template for:each={Errors} for:item="err">
<li class="slds-text-align--right" key={err}>{err}</li>
</template>
</ul>
<ul role="alert" aria-atomic="true">
<template for:each={Errors} for:item="err">
<li class="slds-text-align--right" key={err}>{err}</li>
</template>
</ul>