WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Acceptable use of the HTML DL element?

for

From: patrick dunphy
Date: Jun 19, 2010 8:45AM


Cheers Andrew. The expectation of common practice & the relationship
between AT tools is an important point.

Thanks!
-PD

On 2010-06-19, at 7:48 AM, Simius Puer < <EMAIL REMOVED> >
wrote:

> Hi Patrick
>
> I think you have all the argument that you need right there.
>
> *Semantics*
>
> As with all tags, the usage of each should be semantically correct
> and <dl>
> just isn't quite right for this purpose. The code itself isn't
> "inaccessible" as such, and there *could* be instances where you could
> legitimately use it e.g.
>
> <dl>
> <dt>Apple</dt>
> <dd><a href="">edible<a></dd>
> <dd><a href="">fruit<a></dd>
> <dd><a href="">red<a></dd>
> ...etc
> </dl>
>
> ...possibly not the clearest example, but I'm sure you get the idea
> that you
> always need to consider the context before deciding on the correct
> semantic
> mark-up.
>
> It's a question of what code is "fit for purpose" rather than if it is
> "accessible" in and of itself (i.e. taken out of context).
>
> *Common expectation*
>
> Then there is the other part of the argument that you have raised -
> the
> common expectation. If by accepting the more popular <ul> method your
> navigation is more easily recognised more easily by various tools
> (be those
> browser add-ons, assistive technologies or whatever) then there are
> inherent
> benefits.
>
> *Multi-level*
>
> A <dl> can only ever handle one sub-level of navigation. For many
> larger
> websites this simply is not enough and the <dl> hits a barrier.
> Now, whilst
> you can't nest <dl>s, if anyone says "but we could use a <ul> inside
> the
> <dd>" just ponder why you aren't using nested <ul>s to begin
> with...the code
> is simpler and the CSS for styling it will be too.
>
> Even if multi-level navigation is not an issue for your website now
> it could
> be in the future - any developer should take that into consideration.
>
>
> I can't see why you should encounter any real push-back other than the
> effort required to re-code and re-CSS the menus. The most important
> thing
> is to get by-in to accessibility at *all* levels. Once you have
> that the
> rest is a breeze - but if people don't understand why they are doing
> something, or the benefits of it, then you will meet resistance.
>
> Have a great weekend!
>
>
>