OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] Alternate text for table and image accessibility - textobject, alt, summary?

Bob and others,

As Dr. Kosek said in this thread, “there is a long evolution behind this.”

Sadly, that also applies to the alt vs title controversy in HTML. Google “alt vs title accessibility” and you’ll see that it is far from settled. 

There is a very good article that explains, from the point of view of the HTML spec, the intended difference between alt and title. To summarize: in HTML, alt text is to be used instead of an image (or other object), whereas title text is to be used to provide additional information about an image or object.

In the light of that explanation, it can never be correct for the DocBook XSL to emit an HTML title attribute when it encounters a DocBook alt element. It should emit an HTML alt attribute.

As for how to handle the contents of a DocBook <alt> element, I would vote for the simplest possible support, allowing one and only one <para> with no children. At least for the DocBook to HTML transformation, this would provide a one-to-one correspondence between DocBook <alt> element and the HTML alt attribute. I don’t suppose <alt> is processed at all for FO transformations?

A complicating reason to allow only simple text in <alt> is that IE has for many years incorrectly but universally shown alt attribute text as a tooltip when an element has alt but no title attribute. This has always been a non-standard deviation of IE from the HTML standard, but web developers got so used to it, they began to think of the alt attribute as the mechanism for providing tooltip information. That was wrong, but widely believed. This may have been the reason, back in the day, behind having the DocBook XSL transform <alt> to a title attribute. Now that IE’s dominance is fading, perhaps we can correct these deviations from the standards.

Following up on Peter's comment, on further examination of the stylesheets, I think you will be frustrated if you try to use alt, because the current support for it in the stylesheets is very limited.

In DocBook 4.5, the alt element was allowed only in equation and inlineequation.  In DocBook 5.0, alt was added to the block-level elements mediaobject, table, informaltable, and informalequation.   It also expanded into over 150 other elements because it was added to the "ubiquitous inlines" class of elements, so it is available most places where text content is allowed, including para and entry.

However, the stylesheets have not been completely updated for these changes.  Only alt in mediaobject generates an alt attribute on <img>. Also, for some inline elements, an alt child if present will generate a title attribute on the html <span> element.   For all other cases, the default template for alt is used, which generates no output.

This situation clearly needs some improvement.  Before proceeding, I'd like to hear what others have to say regarding alt and accessibility for various elements, so that best practices can be followed if possible. For example, what should be done with any alt children of a para?

Bob Stayton
Sagehill Enterprises

On 9/11/2014 8:10 AM, Peter Desjardins wrote:
I think you picked the correct list. This one is for discussing
element choice and semantics, I think.

When I was writing for a large company that enforced strict
accessibility requirements I used the alt element for images and
tables. As far as I can tell, the alt element is specifically for
alternate text, as used for accessibility

(Veering into the publishing topic) I find that text in
informalfigure/mediaobject/alt makes its way into the alt attribute of
my HTML img elements. However, text in informaltable/alt elements
seems to go nowhere. And I have a hazy memory of customizing HTML
output for tables in order to handle the alt element in the way my
company required. But it wasn't too hard any you can get help on the
docbook-apps mailing list, which is for discussing publishing tools
and customization.

Good luck!


On Thu, Sep 11, 2014 at 8:36 AM, Janice Manwiller <janice@sqrrl.com> wrote:
Apologies in advance if this is the wrong list. I've had conflicting advice
about what to post to docbook vs. docbook-apps.

I'm brand new to DocBook, and am reviewing the current source files for the
doc set at my new job.

Is there a recommendation for providing alternate text for accessibility?

The current source files have textobject for images and nothing for tables.

Is the alt element better than textobject?

For tables, should I use alt or summary?



To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org

To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]