Brief Note on Description List Support
TL;DR: Description list support is generally good (with Safari being the outlier), even if you may not like how it is supported.
This post builds on my 2020 tests when iOS 14 finally added (partial) support for description lists (VoiceOver on iOS 14 Supports Description Lists).
The <dl>
has existed since HTML+, or 1993, when it was called definition list. After 30 years, developers still seem confused about how they are exposed. This post means I hopefully don’t have to write lengthy emails, Slack posts, threads, or letters sealed with wax and my signet.
Testing Results
This is not meant to indicate if the browser / screen reader combination is adhering to the specification. Nor your idea of how it should. Instead the table only indicates how the construct is conveyed with qualifiers based on my opinion. I care little if it is consistent from screen reader to screen reader, only that it is consistent within one combination.
The browser and screen reader combinations represent the generally recommended pairings for the platform (which is similar to the most common pairings).
Takeaways
With the qualifiers out of the way, here are the key takeaways:
- Having
<div>
s as (valid) children to the<dl>
s had no effect. - Having multiple
<dd>
s following each<dt>
did not cause issues. - Do not use description lists if you feel it is imperative that:
- screen readers announce a count of all nodes (
<dt>
and<dd>
) - users can navigate description lists or items with list commands;
- screen readers announce “term” and “description” / “definition” on all appropriate parts of the list.
- screen readers announce a count of all nodes (
- Do not use roles with description lists if you have Safari (macOS, iOS, iPadOS) users and:
- Maybe do not use roles with description lists if you have TalkBack users and:
- the announcement must be consistent if mixing roled-up and not;
- Remember users may not care about any of this, so probably test with them.
Key
I am getting weird in how I style these things, so I made a key:
- Yup: my ideal implementation;
- Sure: this implementation is good enough;
- Wut: conveys the critical bits at least;
- Nope: broken (no or incorrect semantics conveyed).
Testing Results
The crunchy bits, which include a lot of footnotes, some kind of round-up per row, and maybe not enough detail for you (it takes a lot of effort to test all these). A pain to read no matter your device because I refactored it so many times I no longer see a table, just my diminished ego.
Added 4 December: If you find this table confounding (I mean, I do), Ben Myers made a prettier layout that does not suffer from trying to convert from Excel and just being tired.
Updated 7 December: I made the table(s) suck less.
Navigation | 1. No ARIA | 2. ARIA 1.1 Term/Definition Roles | 3. ARIA 1.3 (Draft) Association List Roles | Round-up |
---|---|---|---|---|
read-all (NVDA + A) | Yup 1, 2 | Yup 1, 2 | Yup 1, 2 | Each pattern announces the same. |
virtual cursor (↓) | Yup 1, 3 | Yup 1, 3 | Yup 1, 3 | Each pattern announces the same. |
list navigation (L) | Yup 1 | Yup 1 | Yup 1 | Each pattern announces the same. |
list item navigation (I) | Sure 4 | Sure 4 | Sure 4 | Each pattern announces the same. |
Navigation | 1. No ARIA | 2. ARIA 1.1 Term/Definition Roles | 3. ARIA 1.3 (Draft) Association List Roles | Round-up |
---|---|---|---|---|
read-all (JAWS + ↓) | Sure 5, 6 | Sure 5, 6 | Sure 5, 6 | Each pattern announces the same. |
virtual cursor (↓) | Sure 3, 7 | Sure 3, 7 | Sure 3, 7 | Each pattern announces the same. |
list navigation (L) | Sure 7 | Sure 7 | Sure 7 | Each pattern announces the same. |
list item navigation (I) | Sure 8 | Sure 8 | Sure 8 | Each pattern announces the same. |
Navigation | 1. No ARIA | 2. ARIA 1.1 Term/Definition Roles | 3. ARIA 1.3 (Draft) Association List Roles | Round-up |
---|---|---|---|---|
read-all (Narrator + R) | Sure 5, 6 | Sure 5, 6 | Sure 5, 6 | Each pattern announces the same. |
virtual cursor (↓) | Sure 3, 5 | Sure 3, 5 | Sure 3, 5 | Each pattern announces the same. |
Navigation | 1. No ARIA | 2. ARIA 1.1 Term/Definition Roles | 3. ARIA 1.3 (Draft) Association List Roles | Round-up |
---|---|---|---|---|
read-all (VO + A) | Sure 2, 5 | Yup 2, 9 | Nope 2, 10 | Applying ARIA 1.1 term and definition roles adjusts count. Applying ARIA 1.3 roles breaks list announcement completely. |
virtual cursor (↓) | Nope 10, 11 | Nope 10, 11 | Nope 10, 11 | Each pattern announces the same. |
list navigation (VO + X) | Sure 12 | Yup 13 | Nope 10 | Applying ARIA 1.1 term and definition roles adjusts count. Applying ARIA 1.3 roles breaks list announcement completely. |
Navigation | 1. No ARIA | 2. ARIA 1.1 Term/Definition Roles | 3. ARIA 1.3 (Draft) Association List Roles | Round-up |
---|---|---|---|---|
read-all (swipe L, “Read from next item”) | Wut 10, 14 | Sure 10, 14, 15 | Wut 10, 14 | Adding the term role gets it announced. |
virtual cursor (swipe right) | Wut 10, 14 | Sure 10, 14, 15 | Wut 10, 14 | Adding the term role gets it announced. |
list navigation (Alt + O) | Sure 16 | Sure 16 | Sure 16 | Each pattern announces the same. |
list navigation (Alt + I) | Sure 4 | Wut 4, 15 | Sure 4 | Uses term role to add more context. |
Navigation | 1. No ARIA | 2. ARIA 1.1 Term/Definition Roles | 3. ARIA 1.3 (Draft) Association List Roles | Round-up |
---|---|---|---|---|
read-all (two finger swipe down) | Sure 15, 17, 18 | Nope 19 | Sure 15, 17, 18 | Uses term and definition roles to break lists. |
virtual cursor (swipe right) | Sure 15, 17, 18 | Wut 17 | Sure 15, 17, 18 | Uses term and definition roles to break lists. |
list navigation (X) | Nope 10 | Nope 10 | Nope 10 | Does not recognize them as lists for keyboard navigation. |
- Announced as a list with 8 items.
- Announces each DT and DD with a pause.
- Arrow key stops at each DT and DD.
- Only navigates DTs.
- Announced as a definition list with 4 items.
- Announces each DT and DD together.
- Announced as a list with 4 items.
- Only DTs get announced.
- Announced as a description list with 8 items.
- Does not announce list.
- Each DT and DD is exposed as a text element.
- Announces as a description list with 4 items.
- Announces as a description list with 8 items.
- Announces DD with trailing “definition”.
- Announces DT with trailing “term”.
- Announces as list, no count.
- Announces as description list, no count.
- Announces DD with trailing “description”.
- Announces as a single string, no pauses, no roles, no list items.
The Tests
I only put together three tests for six roles and three elements, so the permutations are not thorough. I confirmed that adding <div>
s as children of the <dl>
did not affect announcement, but I could not be bothered to add more columns to the table saying as much.
You can build on these for your own use. Visit them at Codepen or view the debug version. Each passed checks (as appropriate) by the Nu HTML Checker and survived, as well as automated accessibility testing tools WAVE, Axe, and ARC (dismissing false positives).
I again encourage you to try your own combinations of patterns for testing.
See the Pen Description List Tests by Adrian Roselli (@aardrian) on CodePen.
My testing suite:
- Firefox 107 / NVDA 2022.3.2
- Chrome 107 / JAWS 2023
- Edge 107 / Narrator / Win11 22H2
- Safari 16.1 / VoiceOver / macOS 12.6.1
- Chrome 107 / TalkBack 13 / Android 13
- Safari 16.1 / VoiceOver / iPadOS 16.1
Related
- HTML 5, § 4.4.9 The
dl
element - HTML 5, § 4.4.10 The
dt
element - HTML 5, § 4.4.11 The
dd
element - ARIA 1.1
term
role - ARIA 1.1
definition
role - ARIA 1.3 DRAFT
associationlist
role - ARIA 1.3 DRAFT
associationlistitemkey
role - ARIA 1.3 DRAFT
associationlistitemvalue
role - HTML Accessibility API Mappings 1.0 Working Draft, § 3.4 HTML Element Role Mappings for
<dl>
(no corresponding role) - HTML Accessibility API Mappings 1.0 Working Draft, § 3.4 HTML Element Role Mappings for
<dt>
(term
role, same as<dfn>
) - HTML Accessibility API Mappings 1.0 Working Draft, § 3.4 HTML Element Role Mappings for
<dd>
(definition
role) - Accessibility Support, dl element (description list) (html)
- MDN, <dl>: The Description List element
- NVDA issue, #3858 Definition lists not exposed correctly, February 2014
- JAWS issue, #157 Support for Definition/Description Lists, December 2018
- Jules Ernst, Description list, March 2018
Update: 25 March 2024
Tim White performed some testing with JAWS and VoiceOver and, unlike my post, he included VoiceOver with Chrome. Much briefer tests and therefore likely easier to read. He also posted a video of each test to YouTube, something I could not be arsed to do.
Leave a Comment or Response