WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: use of <pre> tag

for

From: Simius Puer
Date: Nov 5, 2010 10:36AM


Jared

I quite agree, it really is not as black and white and it should be. It
could be, and therefore often is, interpreted really badly, especially as a
lot of the time it refers to a "visual equivalent".

A document *with* structure (you keep referring to emails, but emails are
typically nothing more than simple paragraphs) should be marked up with the
structure in the first place. And yes, if I send complex emails I do
actually apply headings - not for accessibility per se, but simple
usability.

You shouldn't really argue that a document that is visually dire because of
a total lack of mark-up can be equally as bad and still be accessible as a
result of making it plain text. This might technically be "compliant" but
it would only be taking the most ill-conceived tick-box approach.

Sadly the refresh adds little in the way of clarification:

"*503.2 Information, Structure, and Relationships.* Information, structure,
and relationships presented visually to the user shall be programmatically
determinable or be available in text."

The intent of this provision is to ensure that information and relationships
*that are implied by visual or auditory formatting* are preserved when the
presentation format changes.

...sadly if there is no structure implied to begin with then the clause does
not technically apply. However, if you do not assume that there is
*some*common sense applied at
*some *level and that documents will have some semantic mark-up then you
could argue: sure, go use the <pre> tag for anything you find too
challenging to mark-up properly to begin with.

The assumption is that there is *some *indication of structure to begin with
- an exceptionally dangerous assumption if you ask me.

It does get better though. The refresh also adds:

"The sub provisions under *503.2 *are not an exhaustive list of information,
structure, and relationships that might be presented to an end-user."

One of which is:

"*503.2.3 Section Headings.* When content is divided into sections, section
headings shall be programmatically determinable."

However (and I really hate reading these things with my legal hat on) you
could argue that the sub-provision only applies when, according to the main
provision: "information and relationships ... are implied by visual or
auditory formatting"

At the end of the day would you honestly try to argue in a court of law that
a lengthy legal document written inside a <pre> tag constitutes as
accessible? Would you even hint at advocating that approach to the people
on this list?