The DOA (or more appropriately, Dead Before Arrival) XHTML2 working standard indicates support for the <di>
tag.
[...] The term and its definition can be grouped within a
di
element to help clarify the relationship between a term and its definition(s).
To clarify, this tag would be used to group <dt>
and <dd>
tags together under a <dl>
:
<dl>
<di>
<dt>defenestrate</dt>
<dd>throw through or out of the window; "XHTML2 was defenestrated"</dd>
<dd>what I will do if web standards keep going they way they are</dd>
</di>
</dl>
Anyway, since <di>
is out the window (heh), I was wondering what (if any) currently supported markup patterns could be described as semantically and structurally equivalent? I've essentially accepted that <dl>
is not sufficient for my requirements (as far as aesthetic requirements go), so I'm on to looking at other solutions.
My intent for <di>
was primarily a style hook1, as I'm using a definition list and intend to style the term/definition groupings as a single item.
For the sake of accessibility, I will be using the aria-*
and role
attributes to help define the relationship, but I'm hoping that there exists some generally accepted structure to emulate <di>
, that I simply haven't encountered.
For example, I'm considering something like the following:
<ul>
<li>
<dfn id="term-1">term</dfn>
<p aria-labelledby="term-1">definition for term 1</p>
<p aria-labelledby="term-1">another definition for term 1</p>
</li>
<li>
<dfn id="term-2">term</dfn>
<p aria-labelledby="term-2">definition for term 2</p>
<p aria-labelledby="term-2">another definition for term 2</p>
</li>
</ul>
1. As I understand it, this is an oft-cited reason for its exclusion from HTML5 (that it is merely a style hook). Frankly, I think that's bull since it is a perfectly reasonable way to group terms and definitions for both aesthetic and parsing purposes. But who cares, right? Unquoted attributes and incomplete tags are far more important.</sarcasm>
.
– Diodeus - James MacFarlane Jan 07 '14 at 21:57` won't work here, due to the child element constraints of only `- ` and `
- `. I can use a `
– Dan Lugg Jan 07 '14 at 22:01` and do my best to define a relationship between the item parts; that's where I'm headed now. I'm just wondering if this problem has been tackled more formally, and has an existing solution.