web developer's blog

Archive for the ‘Accessibility’ Category

Definition lists – a natural solution?

leave a comment »

I’ve been recently using definition lists for many times. A little reminder:

Definition lists vary only slightly from other types of lists in that list items consist of two parts: a term and a description.

What does it remind to you as programmers? Does it remain you of the good, old “key-value”? I’m sure it should!

Whenever I browse page sources across the internet, I rarely find this kind of list, despite it brings your markup semantics on the higher level. It has positive impact on accessibility, because it helps understand the content in the way you really mean it on the semantic level. It has become really natural in use for me and I really recommend you start using it whenever you want to present pure term-definition or key-value pairs. I’m purposely ignoring here the visual possibility to interpret the information, as this argument fails on the accessibility field.

Definition lists: the dl , di , dt , and dd elements


Written by Leszek Stachowski

November 5, 2010 at 10:16 pm

Semantically correct breadcrumbs in CakePHP

with one comment

I’ve recently started a discussion on CakePHP Google groups about HtmlHelper::getCrumbs() output. Currently, it generates a string of separated (by the chosen separator) links. It is of course correct syntactically, but semantically it is totally wrong – navigation elements like menus and breadcrumbs should be built using (x)html lists as they are a list of elements. For such purpose, tags like ul and ol are made.

Link to the discussion.

Link to the issue’s ticket.

Written by Leszek Stachowski

June 25, 2010 at 6:40 pm