1
votes

I am trying to figure out why NVDA isnt speaking the inner HTML of a div that has a tabindex. The snipped below is inside a jquery-ui-dialog with an aria role of dialog. If I remove the aria-label, and I tab to this section NVDA just says "section". If I leave the aria-label, it speaks it. Is there a way to have it say the inner HTML without duplicating the text everywhere?

 <div class="current-chapter" tabindex="0" aria-label="Chapter 1 of 10">
                Chapter 1 of 10
            </div>
1

1 Answers

0
votes

aria-describedby can be used for this, e.g.:

<div role="dialog" aria-describedby="dialogBody">
    <div id="dialogBody">
         Chapter 1 of 10
    </div>
</div>

May be span with the id would work too.