WebAIM - Web Accessibility In Mind

E-mail List Archives

TOCI tag issue in PDF solved - sort of

for

From: Karen McCall
Date: Feb 8, 2022 11:58AM


Everyone:

I've been trying to figure out why my screen reader, starting in 2019 divides the TOCI items into:

Introduction as a link
The dot leaders as a link.
The page number as a third link in the TOCI.

This was not happening before October 2018.

I didn't think that a <Span> tag would cause such an accessibility barrier. I also haven't had time, until now to track this down.

The culprit is the <Span> tag in the TOCI tag.

Problem semantic:
<TOCI>
<Reverence>
<Link>
Link-OBJR
<Span>
Introduction
<Span>
Dot Leaders
<Link>
Dot Leaders and page number
<Span>
The space after the period.

I remediated the TOCI by moving the second <Link> item under the first <Link> item and deleting the empty <Link> tag. That didn't work.

It wasn't until I removed all the <Span> tags under the <Reference> tag that I was able to get a coherent TOCI item read by the screen readers.

So the syntax best practices guide creates an inaccessible TOCI. I looked at their example and it was set up like the problematic one at the start of this post.

The fix - remove the <Span> tags completely:
<TOCI>
<Reference>
<Link>
<Link-OBJR
Introduction
Dot Leaders
Page number

Ya gotta love clean tags!

...and it's NOT the fault of my screen reader! It is the tag implementation!

BTW, do not put Alt text on the <Link> tags in a TOCI...It breaks the TOCI. It is read as it should be without the Alt Text.

Cheers, Karen