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
Accessible name from caption #1019
Comments
some comments have been left in #1020 additional comments that i was going to bring up on yesterday's call, but we didn't get to: I'm interested in the reasoning that Since Also, per @jnurthen's comment in pull request 911 I feel like it is worth asking if a reuse of
I'm curious as to how that got in there? |
Right now, the caption role states the following:
If, given all that guidance, the author chooses not to do what the spec suggests:
EDIT: When I wrote this, I had forgotten name is required on table. So the above items don't really apply. But my observations below about name from caption being a not good idea still do. Taking the example from the spec:
Let's say the author did NOT use aria-labelledby and/or aria-described by. Should the accessible name of the table really be: "Contest Entrants This table shows the total number of entrants (500) the contest accepted over the past four weeks."?? Accessible names are supposed to be short; not long and descriptive. In addition, long names can interfere with users getting the important information they might want in a timely/efficient manner. For instance, given a table, the screen reader might speak the following:
If the accessible name of the table is really long, the user has a choice:
Neither of the above strike me as a winner. And, yes, I know. In HTML the name comes from the caption. That doesn't necessarily mean it's a good idea. 😀 |
Just flagging a quick observation and related thought for now on this.
This is a spectacular question. The way figure is handled, which is very similar e.g. it uses figcaption as label of figure, makes for an absolutely atrocious user experience because of these exact concerns.
Here’s an example from a news article, and the exact same thing could happen to table if we’re not careful about this:
Output from Jaws:
Enlarge/ Test doses of another potential SARS-CoV-2 vaccine. MLADEN ANTONOV / Getty Images figure
Image of vials and syringes on a tray.Graphic‑
Enlarge/ Test doses of another potential SARS-CoV-2 vaccine. MLADEN ANTONOV / Getty Images figure end
That’s just terrible for obvious reasons e.g. double-speaking, etc.
So, if a table were to behave that same way RE its caption, the verbosity implications are huge.
|
There are two questions I think in your request.
Since the I consider the coding example above an authoring error, the code should be:
|
@jongund: Roles are not just about labeling convenience for authors; they are also for exposing the nature of the objects to ATs. If an author does what you suggest, there's going to be a weird object with |
@joanmarie I think we have roles that do nothing and just confuse authors into thinking that they do something to improve accessibility. If the caption role did something like provide the accessible name, then it would be worth something to authors and users. But to sometimes have a |
When there's no caption, Orca has its own table navigation commands that assume we have a well-formed table without mystery objects. A proper caption with a proper role is not a mystery object. If an author does what you suggest, we get mystery objects. |
@joanmarie I doubt the |
@jongund: I'm afraid I don't follow you. I just made a test case using the ARIA With the above in mind, what do you mean by:
? |
@joanmarie QUESTION: When an HTML CAPTION element is a child of a TABLE element does the browser use it to compute an accessible name in the accessibility API for the TABLE element? |
Yes. And that is, in my opinion, not necessarily a good thing. Consider the very example found in the HTML spec: https://html.spec.whatwg.org/multipage/tables.html#the-caption-element The accessible name of the dice example is:
That entire thing. Names are supposed to be brief and not descriptive. Because name comes from caption, the name is NOT brief and IS descriptive. Speaking that entire thing before presenting other aspects of the table (e.g. "table with 7 rows, 7 columns") is way too much chattiness for the user. I think that's a problem. In addition, if the user chooses to read the table via the arrow keys, the user is still at the top of the table and gets to hear all that text again. In my opinion, what is happening for HTML is bad. The accessible name of the dice example should, in my opinion, be: "Table 1." |
Hi Joanie, I agree that the folks over at WHAT WG have used
Actually, I would assert that it should be closer to It is regrettable that HTML5 does not have sufficient mechanisms to achieve all of our goals, and I fought like hell to preserve the NOTE: I went so far as to file a Formal Objection against Obsoleting The reasons then for obsoleting the So, I'm with Jon: I'd also suggest filing a bug against that entry in the WHAT WG spec, and request that they change their example to something more appropriate (and perhaps then they may also understand why tables need both accessible names AND accessible descriptions...) |
Recognizing my previous comment was somewhat tangential, I think what Jon is saying is that this is valid HTML:
Whereas this is not:
I agree that this is something of a problem, but I am less convinced of Jon's suggestion: I believe instead that a case could be made for @aria-summary (which would take string text), and could be the logical counterpart to aria-describedby (in the same way that aria-label takes string text, whereas aria-labeledby takes an ID ref). For the second example, the correct answer to Jon is do not mix the ARIA and HTML together in the same complex component: this DOES validate*:
(* or at least should once ARIA 1.2 goes to Rec) |
We have |
@joanmarie My main concern right now with the Maybe the table model for accessible name and description needs to be revisited from an authoring perspective of what authors need and what roles/properties can support authors. For example:
|
@jongund Understood. If the group decides to support name from caption I won't stop them. :) BUT if the group does not decide to support name from caption, what you suggested about using a generic object is concerning to me because for my platform generic objects in a table don't make sense. I would want validators to spit up on that sort of authoring. |
@joanmarie |
Just FYI: There is currently a JAWS bug that prevents the correct output of role=caption in Chrome and Edge: FreedomScientific/standards-support#391 |
I will not have time to work on this issue for ARIA 1.3. |
closing as this is no longer in scope |
The
table
role andfigure
roles should be able to use the 'caption` role to provide an accessible name.The text was updated successfully, but these errors were encountered: