Hello Robert and Jirka,
Jirka Kosek schrieb:
On 26.6.2012 14:23, robert wrote:
I'm using DocBook XSL stylesheets to generate XHTML files. Those must
conform to the WAI-ARIA specification.
That's quite strange requirement. ARIA is used to annotate *web
applications* not static web pages in order to allow interaction with
various widgets to people with disabilities.
Actually, ARIA is used in good old HTML too :)
Where assistive technologies support ARIA, it is very useful to users in
discerning the functionality of content, and AFAIK there is an upwards
trend in its applicability.
As to your question Robert:
DocBook does have the @role attribute, whereby, if I remember correctly,
the XSL transforms these into class attributes by default.
So, you will need to do something in your custoimization layer to
maintain the @role in your HTML output.
What that is, will depend on what ARIA roles you are thinking of using,
but I am guessing some match statement will allow you to account for them.
I've noticed that by default HTML
files output by the DB XSL violate the specification. For example, the
specification forbids the use of list elements for formatting and DB XSL
use <dl><dt></dt></dl> constructs for index files and TOCs.
I think that especially for index dl/dt is very good semantic fit. It
would be interesting to know why you think that dl/dt is inappropriate
for things like index and ToC.
"Violate the specification" or no, <dl>'s are definitely semantically
less adequate in the case of TOCs (not sure about indexes, I haven't
given that any thought yet).
To make this clearer, consider how a screen reader reads the contents of
a dl:
"[dt- insert text here] EQUALS [dd]"
This is because <dl> is a *definition* list, and thus the semantic
relationship between the <dt >and the <dd> is one of <dd> defining or
explaining what the <dt> MEANS in some way.
So the perfect fit for <dl> use would be glossaries, for example.
That however does not apply in a TOC setting, whose semantic function it
is to group the contents of a text by displaying its headings in a
structured manner to reflect the structure of the document.
So here, (nested) <ul>'s or even <ol>'s are definitely semantically more
adequate!
And actually, changing the way the TOC is marked up (Bob has already
explained how) is also one of the first things I did in my customization
layer.
HTH!
Nathalie
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]