-
Notifications
You must be signed in to change notification settings - Fork 344
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
added caption role to table example #1484
Conversation
Hi @jongund. Unfortunately the build is failing because the Nu checker doesn't recognize the caption role. The build also seems to have a problem with the deleted |
@carmacleod |
@@ -42,7 +42,7 @@ <h2 id="ex_label">Example</h2> | |||
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div> | |||
<div id="ex1"> | |||
<div role="table" aria-label="Students" aria-describedby="students_table_desc"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to our table naming guidance, the aria-describedby is superfluous on table elements if a caption is present. I assume this would be true if the the element is an ARIA caption as well.
@@ -121,6 +121,12 @@ <h2 id="rps_label">Role, Property, State, and Tabindex Attributes</h2> | |||
<td><code>div</code></td> | |||
<td>Refers to the element that serves as the caption for the table.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This table row would need to be removed if aria-describedby is not needed.
<th scope="row"><code>caption</code></th> | ||
<td></td> | ||
<td><code>div</code></td> | ||
<td>The element containing a description of the table contents.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest wording consistent with other roles
<td>The element containing a description of the table contents.</td> | |
<td>Identifies the element as a caption for the table.</td> |
Actually, implicit labelling/describing with ARIA caption role has not been specified. The ARIA spec for role="caption" says authors SHOULD use The table naming guidance that you linked to is specifically about an HTML table element with an HTML caption element child. HTML-AAM specifies this relationship in its mapping for HTML caption element and the section on Accessible Name and Description Computation for HTML table element. CORE-AAM maps the new caption role to platform roles, but it defers to ACCNAME for naming and describing. So I think that if we were to specify implicit labelling/describing for the new ARIA caption role, it would need to go somewhere in ACCNAME. Maybe it could somehow be crammed into step 2D, or perhaps added as a new step after step 2D (step 2Dii anyone?), with words something like:
We might also need to reword other parts of ACCNAME a bit here and there, for example name from author currently says:
The ARIA spec for table would also need to mention the caption role somewhere (e.g. might need a new "Allowed Owned Elements:" characteristic that lists "caption" role). Other roles that can be named by a caption role, i.e. figure, grid, treegrid, would also need to mention caption - they currently don't. Seems to me that this behavior is on the borderline between what user agents are willing and not willing to do. On the one hand, it only affects assistive technologies because it just provides another way to link up an accessible name or description. On the other hand, it further complicates the already complex ACCNAME algorithm. I have a vague memory of the group discussing this in several ARIA WG calls, but I don't recall the conclusion. Might be all rolled into the "Name from legend" discussion, which I believe we still need to finalize before ARIA 1.3? [Edit: I rediscovered @jongund's PR https://github.com/w3c/aria/pull/1020, which fixes up the caption & legend labelling techniques in the ARIA spec. At a quick glance, I think that PR addresses many of the points in this comment. If we get it finalized in the ARIA spec, we can then get the labelling techniques specified in ACCNAME so that browsers can understand what to implement.] |
The value of the |
Added caption role to the table example for issue #1482 and also updated list of roles, properties and states and the table regression test to include caption.