I have a div element with role="listitem"
. It contains multiple divs with some text inside. When he outer div is focused, I want a custom aria-label to be read instead of the inner texts. Here is my sample code:
<div role="listitem" aria-label="Hello World" tab-index="0">
<div> A </div> <div> b </div> <div> c </div> <div> d </div>
</div>
On JAWS and Narrator, it works as expected. On NVDA, it's reading the inner text.
On changing outer div to anchor tag, NVDA is reading correct aria-label
, but I cannot do that in prod code.