This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28404 - Calculating the accessible name of a table based on caption is sometimes not ideal
Summary: Calculating the accessible name of a table based on caption is sometimes not ...
Status: RESOLVED INVALID
Alias: None
Product: ARIA
Classification: Unclassified
Component: HTML AAM (show other bugs)
Version: Future
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-03 16:30 UTC by Joanmarie Diggs
Modified: 2018-05-03 21:19 UTC (History)
4 users (show)

See Also:


Attachments

Description Joanmarie Diggs 2015-04-03 16:30:10 UTC
Apologies for the vague summary, but since it's not clear what the bug or fix is, it is the best I can do at the moment. ;)

If authors do something like is showing in this example:
http://www.w3.org/TR/html5/tabular-data.html#the-caption-element

And if authors do not use aria-labelledby or aria-label to provide a name for the table, the accessible name of the table is to be calculated from the caption element as per this: http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#table-element-accessible-name-calculation

Going back to the example in the HTML5 spec, the resulting accessible name is: 'Table 1. This table shows the total score obtained from rolling two six-sided dice. The first row represents the value of the first die, the first column the value of the second die. The total is given in the cell that corresponds to the values of the two dice.'

While we've never (as far as I'm aware) specified that names are expected to be short, that is (as far as I'm aware) the understanding most of us in the accessibility community are operating under. Longer, descriptive, detailed information seems more appropriate for the accessible description.

Having said all that, I'm not sure what the right answer is. It might be author guidance pointing out that if they provide descriptive information in the caption, they should also use aria-label or aria-labelled by. It might be tweaking the name calculation heuristic for tables. For instance, the HTML 5 spec example would be solved by using the first child element of the caption as the name (though heuristics are fragile by nature and maybe that would just make things worse). The only thing I know for sure, as a screen reader developer, is that ginormous accessible names are not ideal.
Comment 1 John Foliot 2015-04-03 17:46:31 UTC
> The only thing I know for sure, as a screen reader developer, is that ginormous accessible names are not ideal.

+1 to that.
Comment 2 Joanmarie Diggs 2015-04-03 17:55:48 UTC
To clarify something in my opening report:
 
> Having said all that, I'm not sure what the right answer is. It might be
> author guidance pointing out that if they provide descriptive information in
> the caption, they should also use aria-label or aria-labelled by.

What I meant is "use aria-label or aria-labelled by **to provide a short name that does not include the descriptive information**." Because if authors do that, the name will be short and the caption will wind up in the accessible description (if no other description trumps it in the calculation algorithm).
Comment 3 steve faulkner 2015-04-04 09:00:44 UTC
(In reply to Joanmarie Diggs from comment #0)
> Apologies for the vague summary, but since it's not clear what the bug or
> fix is, it is the best I can do at the moment. ;)
> 
> If authors do something like is showing in this example:
> http://www.w3.org/TR/html5/tabular-data.html#the-caption-element
> 
> And if authors do not use aria-labelledby or aria-label to provide a name
> for the table, the accessible name of the table is to be calculated from the
> caption element as per this:
> http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#table-element-
> accessible-name-calculation
> 
> Going back to the example in the HTML5 spec, the resulting accessible name
> is: 'Table 1. This table shows the total score obtained from rolling two
> six-sided dice. The first row represents the value of the first die, the
> first column the value of the second die. The total is given in the cell
> that corresponds to the values of the two dice.'
> 
> While we've never (as far as I'm aware) specified that names are expected to
> be short, that is (as far as I'm aware) the understanding most of us in the
> accessibility community are operating under. Longer, descriptive, detailed
> information seems more appropriate for the accessible description.
> 
> Having said all that, I'm not sure what the right answer is. It might be
> author guidance pointing out that if they provide descriptive information in
> the caption, they should also use aria-label or aria-labelled by. It might
> be tweaking the name calculation heuristic for tables. For instance, the
> HTML 5 spec example would be solved by using the first child element of the
> caption as the name (though heuristics are fragile by nature and maybe that
> would just make things worse). The only thing I know for sure, as a screen
> reader developer, is that ginormous accessible names are not ideal.

hi Joanmarie, i agree with you assessment, one option is to improve the advice in html5 spec, which I think needs doing. The history behind how that advice came to be in the spec is not one of collaboration and think we can do better.
Comment 4 James Nurthen 2018-05-03 21:19:45 UTC
HTML AAM is no longer an ARIA Deliverable. If you wish to pursue this issue please file at https://github.com/w3c/html-aam/issues