So I was able to get my page working just fine with the NDVA screen reader, however, when testing in JAWS, it tabs to the span, but doesn't read the text.
<span tabindex="0" title="whatever">whatever</span>
UPDATE:
What I am trying to achieve is a I have a few elements which expand/collapse certain sections of the site I'm building. These functional elements, however are not links.
Reponse to @discojoe (thanks for the response)
- Adding a
TABINDEX="0"
attribute will insert the SPAN/DIV element into tabbing list in natural order (whereas by default, they're usually not added to the tabbing list). This allows screen readers to tab to that element, and is working just fine. Specifically, my problems is JAWS will just tab to that element, it just doesn't read it. - I agree, using
TABINDEX="n"
(where n > 0) is a bad thing which messes with the natural order of the tabbing list, and I am not doing that. - Also, you can use
TABINDEX="-1"
to remove an element from the tabbing list if it's placed in there by default (example an A or INPUT tag). - I have already tried using tags, however, when user hits enter on this link (to trigger the onclick event), it does something (not quite reloading, but kinda re-initializing) to the page which delays the animation associated with that element. I find that to be a bad experience to both normal and disabled users.
- using the # tag in the A tag adds the hash tag to the page title in IE.
- Additionally, using A tags makes the screen reader read out "LINK" before/after each element, and since they're not actually links, I feel this is negative impact on accessibility.