Each of the anchors (both the a
elements and heading anchors) below have an id
and tabindex="-1"
.
Target anchors 3 and 6 are hidden with display:none
until they are targetted with the link at which point they are made visible and focus is set to them.
- 1. Link to visible simple anchor
- 2. Link programmatically setting focus to visible simple anchor
- 3. Link programmatically setting focus to previously hidden simple anchor
- 4. Link to visible heading anchor
- 5. Link programmatically setting focus to visible heading anchor
- 6. Link programmatically setting focus to previously hidden heading anchor
Simple Anchor Always Visible — no programmatic focus
Simple Anchor Always Visible — focus is set programmatically
Simple Anchor Hidden and Made Visible when Targetted — focus is set programmatically
Heading Anchor Always Visible — no programmatic focus
Anchor #4
Heading Anchor Always Visible — focus is set programmatically
Anchor #5
Heading Anchor Hidden and Made Visible when Targetted — focus is set programmatically
Anchor #6
NVDA 2010.1
When focus is set to a simple anchor that was not previously hidden, things are fine, but when focus is set to a previously hidden simple anchor made visible, NVDA calls it a link, though it has no href
and does not link to anything, and focus does not fully move to the anchor.
If the anchor is a heading, in FF3.6 NVDA normally calls it a heading, identifies its level, and reads the heading's text. If the heading was previously hidden and now visible, however, NVDA simply calls it a heading, and focus does not move to the heading anchor. In IE8, and NVDA says "edit" instead of "heading", presumably because of tabindex="-1"
. And with the previously hidden heading, NVDA in IE8 additionally enters Focus Mode, though focus does move to the heading anchor.
JAWS 11
In IE8, JAWS 11 will not read either of the simple anchors' text when focus is programmatically set to them, though focus does fully move to the anchor. In FF3.6, JAWS reads each of the three simple anchor's text when they receive focus. In neither browser does JAWS call the previously hidden simple anchor a link.
With the heading anchors, JAWS identifies them as headings with a level, and fully moves focus to them in both IE8 and FF3.6.