The links contained in h2 elements in the cards on the Patterns
and Fundamentals
pages exhibit some severely buggy behavior when using JAWS, Narrator, or VoiceOver in Chrome, Edge, or Safari. The behaviors are slightly different for each screen reader. NVDA is not impacted. And similar problems are not observable with JAWS or Narrator in Firefox.
I don't see any reason for the problems in the HTML; it looks perfect:
<li class="tile tile-accordion">
<h2 class="tile-name">
<a href="/patterns/accordion/">
<img src="/assets/img/accordion.svg" alt="">
<span>Accordion (Sections With Show/Hide Functionality)</span>
</a>
</h2>
<div class="tile-introduction">
An accordion is a vertically stacked set of interactive headings that each contain a title, content snippet, or thumbnail representing a section of content.</div>
</li>
Perhaps the buggy behaviors are related to the CSS???
Note that links contained inside headings on other sites work correctly; the problems do not appear to be caused by the link being wrapped by a heading.
JAWS Behavior in Chrome and Edge
Open the patterns page. With the virtual cursor active, use down arrow or 'h' to navigate to the heading for a card and press enter to activate the link contained in the heading.
Expected behavior: The target page is opened.
Actual behavior: JAWS repeats the name of the link and nothing else happens; the link is not activated. Users may think the link is broken.
Note: there are 3 ways to get around the problem: 1) press enter a second time. 2) use Tab to navigate to the link instead of using virtual cursor reading keys. 3) use the JAWS list of links to choose and activate the link.
Narrator behavior in Edge and Chrome
Open the patterns page. With Narrator scan mode on (capslock+s),
use down arrow or 'h' to navigate to the heading for a card and press enter to activate the link contained in the heading.
Expected behavior: The target page is opened.
Actual behaviors:
- When navigating with "h", Narrator announces "command not available" before reading the heading.
- After pressing enter, a portion of the title tag is announced, and focus seems to be set to the body; pressing insert+tab after pressing enter indicates the focus is on the body.
VoiceOver behavior in Chrome and Safari
Open the patterns page.
Reading with ctrl-opt-right, navigate to the second H2. Continue using ctrl-opt-right to navigate by element and navigate through several cards.
Expected behavior: The content of an h2 element is announced when the VO reading cursor is on an h2 element.
Actual behavior: Instead of reading the heading content, VO says "dimmed", e.g., VO announces "Heading 2, dimmed, 3 of 29"