I am trying to improve a website's accessibility, and I am coming across some issues making things work for both mobile (VoiceOver and TalkBack) and on desktop using NVDA. I am trying to use the Bootstrap Popover widget for a text input, as seen here:
https://codepen.io/gspan/pen/qBEPZOY
<label class="form-group name" for="name">
Name
<div class="wrap">
<input name="name" id="name" class="form-control" value="" type="text" aria-describedby="nameInfo" />
<div id="nameInfo" tabindex="0" data-trigger="hover focus" data-toggle="popover" data-placement="bottom" data-content="Name Content Popup Here" aria-label="Name Content Popup Here" aria-hidden="true"></div>
</div>
</label>
My desired functionality is:
- For a keyboard user (with no assistive technology) to be able to tab over to the info icon in order for the popover to show.
- For a screen-reader user (mobile or desktop) to have the focused input read the content of the popover without needing an additional jump to the icon itself, and then have the icon hidden from the screen-reader focus.
I have addressed #1 with a tabindex on the popover div, and #2 by linking the input and popover with aria-describedby and hiding the icon with aria-hidden.
My issue is that specifically on NVDA it will still focus on the info icon, and read it out as "blank". It will focus and read the content correctly if I remove the aria-hidden, but then it causes the user an unnecessary additional focused item they need to get through.
This is only happening on NVDA, on every browser I have tried (IE, Edge, Firefox, Chrome). Does anyone have a suggestion for getting around this?
Thanks in advance!