WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Description lists in PDF using LI, Lbl and LBody

for

Number of posts in this thread: 5 (In chronological order)

From: Jonathan Avila
Date: Tue, Jul 06 2021 8:55PM
Subject: Description lists in PDF using LI, Lbl and LBody
No previous message | Next message →

Hi all,
Many years ago Duff Johnson had written an article on considering use of PDF list semantics for description lists (e.g. akin to the DL element in HTML).
http://duff-johnson.com/articles/lists-contrasting-html-with-pdf/ I wanted to get people's thought on using the Lbl and LBody within a LI list item for data pairs as labels and values, etc. I've noted that when I run an example which users words in the Lbl PAC 3 seems to flag it as potentially a misuse of the structure. Thoughts? Is this a good or bad implementation?

An example might be a word and definition or a data pair such as "Median house price" in the lbl and the cost in $ in the LBody.
Jonathan

From: Philip Kiff
Date: Wed, Jul 07 2021 6:47AM
Subject: Re: Description lists in PDF using LI, Lbl and LBody
← Previous message | Next message →

My impression is that using the L/LI list tag structure in PDFs for
something that corresponds to a definition list in HTML is a permitted
and expected use. But I've personally not used it very often. Then
again, I don't use DL definition lists in HTML very often either.

There should be no issues with PAC 3 flagging such lists if they are
well-formed in other ways. Here is a link to a publicly available
document I worked on last year. The PDF version uses tags a glossary
starting on page 87 (Appendix B) using the L/LI list structure, with Lbl
tagging the word or phrase and LBody tagging its definition:
https://www.emergencymanagementontario.ca/english/emcommunity/response_resources/plans/provincial_emergency_response_plan.html

The example of a data pair like "Median house price" sounds more likely
to fit a table structure - if it's data then a table is appropriate. You
don't need a visible table grid to mark a list as a two-column table.

Phil

On 2021-07-06 22:55, Jonathan Avila wrote:
> Hi all,
> Many years ago Duff Johnson had written an article on considering use of PDF list semantics for description lists (e.g. akin to the DL element in HTML).
> http://duff-johnson.com/articles/lists-contrasting-html-with-pdf/ I wanted to get people's thought on using the Lbl and LBody within a LI list item for data pairs as labels and values, etc. I've noted that when I run an example which users words in the Lbl PAC 3 seems to flag it as potentially a misuse of the structure. Thoughts? Is this a good or bad implementation?
>
> An example might be a word and definition or a data pair such as "Median house price" in the lbl and the cost in $ in the LBody.
> Jonathan
>
> > > >

From: Steve Green
Date: Wed, Jul 07 2021 8:18AM
Subject: Re: Description lists in PDF using LI, Lbl and LBody
← Previous message | Next message →

It doesn't feel right to me. As Duff said in his article, the <Lbl> tag is intended to specify the semantics of the list, not contain data.

That said, PAC3 and the CommonLook PDF Validator don't report any errors and screen reader behaviour seems reasonable, so I can't see a strong argument against the technique other than it's ugly (which probably won't bother people who want to use the technique).

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Philip Kiff
Sent: 07 July 2021 13:48
To: = EMAIL ADDRESS REMOVED =
Subject: Re: [WebAIM] Description lists in PDF using LI, Lbl and LBody

My impression is that using the L/LI list tag structure in PDFs for something that corresponds to a definition list in HTML is a permitted and expected use. But I've personally not used it very often. Then again, I don't use DL definition lists in HTML very often either.

There should be no issues with PAC 3 flagging such lists if they are well-formed in other ways. Here is a link to a publicly available document I worked on last year. The PDF version uses tags a glossary starting on page 87 (Appendix B) using the L/LI list structure, with Lbl tagging the word or phrase and LBody tagging its definition:
https://www.emergencymanagementontario.ca/english/emcommunity/response_resources/plans/provincial_emergency_response_plan.html

The example of a data pair like "Median house price" sounds more likely to fit a table structure - if it's data then a table is appropriate. You don't need a visible table grid to mark a list as a two-column table.

Phil

On 2021-07-06 22:55, Jonathan Avila wrote:
> Hi all,
> Many years ago Duff Johnson had written an article on considering use of PDF list semantics for description lists (e.g. akin to the DL element in HTML).
> http://duff-johnson.com/articles/lists-contrasting-html-with-pdf/ I wanted to get people's thought on using the Lbl and LBody within a LI list item for data pairs as labels and values, etc. I've noted that when I run an example which users words in the Lbl PAC 3 seems to flag it as potentially a misuse of the structure. Thoughts? Is this a good or bad implementation?
>
> An example might be a word and definition or a data pair such as "Median house price" in the lbl and the cost in $ in the LBody.
> Jonathan
>
> > > archives at http://webaim.org/discussion/archives
>

From: Duff Johnson
Date: Wed, Jul 07 2021 12:09PM
Subject: Re: Description lists in PDF using LI, Lbl and LBody
← Previous message | Next message →

> Many years ago Duff Johnson had written an article on considering use of PDF list semantics for description lists (e.g. akin to the DL element in HTML).
> http://duff-johnson.com/articles/lists-contrasting-html-with-pdf/ I wanted to get people's thought on using the Lbl and LBody within a LI list item for data pairs as labels and values, etc. I've noted that when I run an example which users words in the Lbl PAC 3 seems to flag it as potentially a misuse of the structure. Thoughts? Is this a good or bad implementation?

The respective specifications (PDF 1.7 and PDF 2.0) are clear that Lbl elements may contain text, so I'm not sure that I understand why there would be a warning. That said I've not looked closely at how this implementation deals with this issue.

> An example might be a word and definition or a data pair such as "Median house price" in the lbl and the cost in $ in the LBody.

PDF's model for lists clearly encompasses this use case.

> It doesn't feel right to me. As Duff said in his article, the <Lbl> tag is intended to specify the semantics of the list, not contain data.

To be clear, the article doesn't suggest (certainly not intentionally!) that Lbl structure elements in PDF should not contain data… just that the contents of the Lbl tag don't determine the list's semantic structure.

Duff.

From: Jonathan Avila
Date: Wed, Jul 07 2021 12:41PM
Subject: Re: Description lists in PDF using LI, Lbl and LBody
← Previous message | No next message

Thank you everyone for responding. I'll dig deeper into why PAC was showing that issue with my list but not the example Phil gave with terms and definitions. Glad to know there is some acceptance of this approach although it's one that is often not used.

Jonathan

-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Duff Johnson
Sent: Wednesday, July 7, 2021 2:09 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Description lists in PDF using LI, Lbl and LBody

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


> Many years ago Duff Johnson had written an article on considering use of PDF list semantics for description lists (e.g. akin to the DL element in HTML).
> http://duff-johnson.com/articles/lists-contrasting-html-with-pdf/ I wanted to get people's thought on using the Lbl and LBody within a LI list item for data pairs as labels and values, etc. I've noted that when I run an example which users words in the Lbl PAC 3 seems to flag it as potentially a misuse of the structure. Thoughts? Is this a good or bad implementation?

The respective specifications (PDF 1.7 and PDF 2.0) are clear that Lbl elements may contain text, so I'm not sure that I understand why there would be a warning. That said I've not looked closely at how this implementation deals with this issue.

> An example might be a word and definition or a data pair such as "Median house price" in the lbl and the cost in $ in the LBody.

PDF's model for lists clearly encompasses this use case.

> It doesn't feel right to me. As Duff said in his article, the <Lbl> tag is intended to specify the semantics of the list, not contain data.

To be clear, the article doesn't suggest (certainly not intentionally!) that Lbl structure elements in PDF should not contain data… just that the contents of the Lbl tag don't determine the list's semantic structure.

Duff.