Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H39 Using caption elements to associate data table captions with data tables needs a rewritten test #2136

Closed
mbgower opened this issue Nov 15, 2021 · 16 comments · Fixed by #2137

Comments

@mbgower
Copy link
Contributor

mbgower commented Nov 15, 2021

H39 is considered sufficient to meet an aspect of 1.3.1; however, the context needs to be better expressed, and the test rewritten to reflect the fact that a caption for a table is not needed.

1.3.1 Info and Relationships states:

Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.

If text exists that seems to provide a name or title for a table, then 1.3.1 requires that there be programmatic indication and proper association for the caption.. That's where H39 comes from.

But if there is no visible text name/title for the table, then there is nothing conveyed through presentation. Therefore 1.3.1 doesn't apply.

Rather than a 3-step test procedure, the test should be written as a conditional:

Existing

For each data table:
Check that the table has content that is presented as a table caption.
Check that the table includes a caption element.
Check that the content of the caption element identifies the table.

Proposed
For each data table that has content that is presented as a table title or caption:

  1. Check that the table includes a caption element.
  2. Check that the content of the caption element identifies the table.
mbgower added a commit that referenced this issue Nov 15, 2021
Update to address #2136
@mbgower
Copy link
Contributor Author

mbgower commented Nov 15, 2021

I created a pull request that makes these changes. I also adjusted the wording of the original third bullet in the procedure, because H39 does not cover the quality of the text used to title a table; only that the text be coded as a caption

@awkawk
Copy link
Member

awkawk commented Nov 15, 2021

@mbgower I don't think that there is anything wrong with H39 as written. IF you want to apply the technique, then all three checks must pass. If you don't want to apply the technique (possibly because the table is a layout table, possibly because the table doesn't need a caption) that is ok too, because those won't meet the technique (the same is true for the original or modified wording).

@awkawk
Copy link
Member

awkawk commented Nov 15, 2021

Also, how did you change the final bullet? It looks the same?

@patrickhlauke
Copy link
Member

to me #2137 makes sense, as it doesn't substantially change anything, but just adds a reminder of what the scope of the technique itself is (i.e. The objective of this technique is to programmatically associate captions for data tables where captions are provided in the presentation.) and gives it as a prerequisite to running the tests, rather than seemingly implying that all tables need that (a reader just skimming this technique may indeed get that impression)

@mbgower
Copy link
Contributor Author

mbgower commented Nov 15, 2021

If you don't want to apply the technique (possibly because the table is a layout table, possibly because the table doesn't need a caption) that is ok too, because those won't meet the technique

@awkawk I agree it is possible to read it that way. But I also have someone arguing that this procedure means you need to have a caption, period, and we should have an automated rule that checked for captions and flagged the absence on any table..

I don't want that to be inferred, and I also think the wording of the third bullet ("Check that the content of the caption element identifies the table.") over-reached what this technique is covering (it's 1.3.1, not 2.4.6).

@mbgower
Copy link
Contributor Author

mbgower commented Nov 15, 2021

Also, how did you change the final bullet? It looks the same?

New wording (with additional commit) is:

Check that the text that titles or describes the table is included in the caption element.

@awkawk
Copy link
Member

awkawk commented Nov 15, 2021

But I also have someone arguing that this procedure means you need to have a caption, period.

They may still argue that. :)

If making a change, I think that we might want to stick to "title" as that is what the HTML spec uses for caption element content.

For each data table that has content that is presented as a title:
Check that the table includes a caption element
Check that the text that titles the table is included in the caption element.

@mbgower
Copy link
Contributor Author

mbgower commented Nov 15, 2021

I think that we might want to stick to "title"

Either is fine with me. The original language of the 3rd bullet had "identifies" so I tried to use that, then on @patrickhlauke's suggestion, changed it to "describes"/ "description", but I think just 'title' is sufficient.

@mbgower
Copy link
Contributor Author

mbgower commented Nov 15, 2021

@awkawk Are there any other tags I should add to this?

@awkawk
Copy link
Member

awkawk commented Nov 15, 2021

@mbgower not sure what "this" means here ...

@mbgower
Copy link
Contributor Author

mbgower commented Nov 15, 2021

not sure what "this" means here ...

@awkawk any other tags to add to this issue? it could be 'wcag 2.2' but it could be for 2.x (for which there is no tag)

@awkawk
Copy link
Member

awkawk commented Nov 15, 2021

Ah, you mean GitHub labels, got it. Two years ago the labels you have would have been fine. Chairs may have others to route now, not sure.

@alastc
Copy link
Contributor

alastc commented Nov 16, 2021

The WCAG 2.0/1/2 labels are used for which version the SC was introduced in, so in this case I've added WCAG 2.0. Helps to work out how many issues are raised or open against which SCs.

@patrickhlauke
Copy link
Member

The WCAG 2.0/1/2 labels are used for which version the SC was introduced in, so in this case I've added WCAG 2.0. Helps to work out how many issues are raised or open against which SCs.

hah, i clearly misunderstood these labels until now, as i thought it was more about which versions are affected, and/or in which version it's likely to get some kind of change made (keeping in mind that older WCAG versions are cast in amber for eternity)

@mgifford
Copy link

I just ran into this issue IRL. Do we need a PR for this to move it ahead?

@bruce-usab
Copy link
Contributor

closed by #2137

@bruce-usab bruce-usab linked a pull request Jun 21, 2024 that will close this issue
mbgower added a commit that referenced this issue Jul 15, 2024
Update to address #2136
Tighten the language of [H39 Using caption elements to associate data
table captions with data
tables](https://www.w3.org/WAI/WCAG22/Techniques/html/H39) to isolate it
to only passing 1.3.1 Info and Relationships:
1. if there is a visible text title/caption for the table, then
2. make sure it is referenced so that the title/caption is
programmaticalyy associated.

---------

Co-authored-by: Patrick H. Lauke <[email protected]>
Co-authored-by: Francis Storr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants