Summary

The purpose of the summary attribute is to concisely describe the structure of a data table. The summary attribute is not intended to provide a long description for data tables.

Author: Gez Lemon

Thanks to Vlad Brown for providing a Ukrainian translation of this article.

The summary Attribute

The purpose of the summary attribute is to provide a concise overview of the structure of data tables. WCAG 2.0 covers this issue under guideline 1.3.1: Information and relationships, where they have a success criterion for using the summary attribute to provide an overview of data tables. The summary attribute is most useful with complex data tables, but can also be useful with simple data tables. Without a summary attribute, assistive technology users need to investigate the data table one cell at a time to build up a mental picture of the structure in their mind. With complex data tables, where columns and/or rows are grouped, building a mental picture can be particularly difficult for non-sighted users, whereas this information is visually obvious to sighted users. Sighted users of any ability are able to determine the structure of the table visually, whereas non-sighted users have no such luxury without the author providing a summary attribute to describe the structure of the data table.

Long Descriptions for Data Tables

The HTML 4.01's definition of the summary attribute uses the term purpose in its definition, which, along with the summary attribute's name, seems to have confused the purpose of the summary attribute.

This attribute [the summary attribute] provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille.

The summary attribute is not intended to provide a long description for data tables.

All sides of the debate agree that if a long description is required, the long description should be provided to all groups, not just screen reader users. The best mechanism to provide a long description is to provide a generic description of the table that is available to all users, and make the association using WAI-ARIA's aria-describedby attribute.

Misconceptions about the summary Attribute

Describing the summary attribute as a long description is dangerous, and almost guaranteed to result in the summary attribute being omitted from HTML5 and later versions. If the summary attribute is omitted from HTML5, user agent support for the attribute is likely to disappear from user agents, even though the attribute is currently very well supported. The summary attribute serves a particular audience; those that cannot determine the structure of the table visually.

The purpose of the summary attribute is to define the structure of data tables to non-sighted users where the relationship cannot be determined by user agents. User agents typically provide the number of columns and rows, but only an author can provide semantic information, such as the rows contain the time the bus leaves a particular bus depot, and the columns contain the destinations for each journey. That information is readily visually available, but a screen reader user would need to examine several cells before they can build that association in their minds. Structural information about how a data table is to be read visually can readily be provided by an author using the summary attribute.

Category: Accessibility.

Comments

  1. [purpose-of-the-summary-attribute.php#comment1]

    Hey Gez this stuff is priceless, just what I need to keep sending to our devs to keep them on the accessibility ball. Nice one and keep them coming

    Posted by Hamish on

  2. [purpose-of-the-summary-attribute.php#comment2]

    G'day Gez.
    Thanks for another interesting article.
    Sorry for the dumb question but could you please point me to some info on how to use the aria-describedby/aria-labelledby attributes? I tried to find an answer to this in the W3C WAI-ARIA 1.0 document you link to but wasn't able to.

    Thanks in advance.

    Posted by Scott Rippon on

  3. [purpose-of-the-summary-attribute.php#comment4]

    Nice article, Gez.

    I'm still a bit dense, though. Can you give me an example of something that's a long description, so should be given to everyone, and something that is a good summary - and so should be provided to screenreader users only but not those with a cognitive disability, for example?

    I'd like to know the difference between the two.

    Secondly, I believe this to be a non-sequitur: "If the summary attribute is omitted from HTML5, user agent support for the attribute is likely to disappear from user agents, even though the attribute is currently very well supported."

    I'm not sure there's any reason to suppose it would be taken out of user-agents. (Taking features out is always tricky as it can introduce regressions as well as upset users for no gain.)

    Posted by bruce on

  4. [purpose-of-the-summary-attribute.php#comment5]

    Hi Bruce,

    A long description could be anything about the table that helps people understand its purpose. A summary describes how the table is organised, which is visually evident. For example, a bus timetable may have the following summary attribute:

    
    summary="The rows contain departure 
    times from this station; the columns 
    contain the destinations for that service"
    

    The purpose of the summary attribute is to help non-sighted people orientate themselves in the data table without having to investigate the cells to build up a mental picture of how the data is organised.

    With correct headings, the visual layout should be enough to show sighted people with cognitive disabilities how the table is organised. Text describing something that is visually evident is more likely to result in confusion.

    Posted by Gez Lemon on

  5. [purpose-of-the-summary-attribute.php#comment6]

    "Text describing something that is visually evident is more likely to result in confusion."

    Agree. Would be good to know if anyone has research on how people with learning difficulties (but who aren't screenreader users) would deal with a train timetable like this example, and whether they would benefit from this summary being visible?

    Perhaps we need an aria-describedby attribute on the table, pointing to a paragraph which can be shown and hidden using the <details> element (which, is to closed/collapsed and have a legend of "details" by default, but could be set to have a legend of "How to understand this table").

    Posted by bruce on

  6. [purpose-of-the-summary-attribute.php#comment7]

    It's all there in the language really... A summary really ought to summarise, and in this case allow a blind person to sum up the table "at a glance".

    It's all about information being fit for purpose, and displayed appropriately...

    If information is likely to be useful to everybody, it makes sense to make it available to everybody. If it's only of use to a blind person, then it makes sense to tuck it out of sight.

    The trick will be encouraging peple to understand the difference, and provide the appropriate level of information in each case.

    Posted by Léonie Watson on

  7. [purpose-of-the-summary-attribute.php#comment9]

    Hi

    I design websites for and with people with learning disabilities. I also test websites with people with learning disabilities.

    I've seen lots of occasions when people have used alt text in IE almost as a 'tool tip' to confirm what an image might represent. Or they've used the title attribute to confirm where a link might take them.

    Often, in my experience, things like a train timetable can be meaningful if it's designed well.

    But, if there is not much distinction between different groups of information, it can be very confusing for some people.

    So, it's possible that summaries could be really helpful for this group as well.

    It would be interesting to test this, of course. It's just a hunch.

    Posted by Antonia Hyde on

  8. [purpose-of-the-summary-attribute.php#comment10]

    Hi Antonia,

    I would definitely be interested in finding out if a text summary would be useful for sighted people with learning disabilities. Anything you, or anyone else who works with sighted people with learning disabilities, could provide to explain how people with learning difficulties find text descriptions aid understanding for things that are visually evident would be very helpful.

    My instinct leads me to believe that the summary attribute is more likely to hinder sighted people with learning difficulties, as it describes what is visually evident. The work I've done for people with learning difficulties is the exact opposite of recommending that text descriptions should be used to assist in the understanding of visual objects. That said, it's an under-researched area, and I appreciate anything you can add to this discussion.

    Posted by Gez Lemon on

Comments are closed for this entry.