WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Accessible P Tag Usage

for

From: chagnon
Date: Mar 19, 2019 3:00PM


The discussion was getting a bit difficult to read so I went back into the WebAIM archives to retrieve the original post: https://webaim.org/discussion/mail_message?id9669

Three key points: 1. The standards are written by people;
2. Over time, the standards evolve and are more eloquently described, defined, and adjusted; and
3. They are interpreted in different ways by testers, checkers, and organizations.

Point 1.
Standards are written by different groups of industry experts from around the world. The primary standards group is the one for HTML / CSS because it's at the root of our current technologies. The WCAG, EPUB, and other standards are subsets that address their particular technology and (hopefully) mesh with the core HTML / CSS standards.

Reading the current definition of the <DIV> tag in HTML 5.1 2nd edition (which I think is the latest from the W3C) at https://www.w3.org/TR/2017/REC-html51-20171003/grouping-content.html#elementdef-div, it states:

<quote> The div element has no special meaning at all. It represents its children. </quote>

Although the HTML definition doesn't explicitly state it, <DIV> for all intents and purposes is a wrapper or container tag that holds other tags. By itself, it has no semantic meaning.

WCAG, PDF/UA, and other accessibility standards provide more details by stating (in their various ways) that "all content must be tagged with a semantically appropriate tag" in order to be accessible to all technologies. So Duff Johnson's comment earlier today is correct; we can't have loose "text flopping about in a <div>". It has to be in a tag inside the <DIV>, a semantically-appropriate tag such as <P>, <Hx>, etc.

All the stakeholders in accessibility -- users, assistive technologies, content creators, software -- must follow the same standards. All of our A T manufacturers are advised to recognize the tags; so when "text is flopping about in a <div>," there's a good chance that one or more of the technologies will not recognize it which can have the same effect as artifacting that content, hiding it from our end users.

<aside> I love Duff's description of text flopping about in a <DIV> </aside>

I don't know of any mark-up language that would allow such a construct; maybe in some half-baked weird XML taxonomy it would be allowed, but not in accessibility.

Point 3:
Not all checkers (human and software) interpret the standards the same way. In theory, they should, but these are voluntary standards, not laws, regulations, or mandates and they are subject to different interpretations and implementations. I think "text flopping about in a <DIV>" should be flagged as a violation in any of our checkers.

We always recommend that our clients use 3 different checkers: one well-trained human plus 2 automated software checkers. That combo should be able to flag items like this. If you find one of your checkers misses this, then submit a bug/feature request to the manufacturer.

<< On the flip side, what about including an empty <p> tag with no text
content, or only an image? >>

I sure hope the empty <P> tags become woven into all of our standards! Although many of our A T tools can be designed to overlook the problem, that kind of gunk really clogs the system when you're trying to migrate content through various technologies -- assistive technologies, cross-media publishing technologies, CMS content management systems, et al.

No double returns between paragraphs.
And while we're at it, no multiple spaces, either.

I'm OK with <IMG>, <FIGURE>, <TABLE> and other elements in a <P>. Sometimes that's the only way we have to insert those items into our content and that technique doesn't produce a hard-stop barrier to those who use A T.

—Bevi

— — —
Bevi Chagnon, founder/CEO | <EMAIL REMOVED>
— — —
PubCom: Technologists for Accessible Design + Publishing
consulting ' training ' development ' design ' sec. 508 services
Upcoming classes at www.PubCom.com/classes
— — —
Latest blog-newsletter – Accessibility Tips at www.PubCom.com/blog