What Summary Tables Should Be Included in Core?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
mgifford's picture

Hey Folks,

I was just looking at evaluating the forum pages for accessibility:
http://drupal.org/node/821672

And noticed that there was no summary for the table here:
http://drupal7.dev.openconcept.ca/forum/1

I think that there should be a summary for this table as defined here:
http://www.dhs.state.il.us/IITAA/IITAAWebImplementationGuidelines.html#w...

But thought we should look & talk a bit more about where to insert these in core and how to approach it.

Any ideas.

Comments

summary support would be great

aenw's picture

I know it's bad form to just post "me too" comments, but I did want to make my support of this explicit. So: Yes, I definitely want so see improvement for table accessibility in core.
I am just now coming up the learning curve on how unusable most forums are with screen readers (not just those done in Drupal), because the tables used for them are so rarely tagged in a helpful way. (I am sighted and am able to work with some folks really experienced with screen readers at the moment.)
Right now I'm working with the advanced forum 2.x module to see if I can get some forum tables produced that will be usable with screen readers, so I'm particularly aware of this need.
I don't yet have the bandwidth to look at core for drupal 7 and think this totally through, but I can certainly give feedback if someone has the time and energy to toss out a first proposal.
(And I'd love to see support for inserting headers= tags, too!)

Don't confuse this group with an issue queue

Cliff's picture

@aenw, Thanks for adding your voice to the support for table accessibility. In an issue queue, it's poor form to chime in with a simple "me too!" because of the ripple effect on already overworked queue moderators. Here, it's a great way to introduce yourself to the rest of the group.

Glad to know you're addressing accessibility with the advance forum 2.x module. Is there anything any of the rest of us can do that would help you out with that project?

Oh, and welcome to our Accessibility discussion! I hope to hear a lot more from you in this group!

Views plugin (patch) for summary for tables

aenw's picture

Thanks for the welcome and encouragement to contribute Cliff. :-)

I came across this yesterday in the Views issue queue and am throwing it out as one possible approach. It's a patch for views_plugin_style_table.inc so that if your display shows your data as a table, there is an additional field you can fill out for the summary of the table. It also changes views-view-table.tpl.php so the summary is printed out. (And as is noted in the issue queue, the patch still should be modified so check_plain is used for the summary.)

Add option to set summary attributes in the html table (Accessibility)

(As a side note, I'm going to think about this approach for adding the header tags in for columns/fields for tables as well. Modifying the table plug-in for Views might be a better approach to make the tables used to present forums more accessible than working with the Advanced Forum module via preprocessing functions and templates with my theme.)

thanks & headers

mgifford's picture

Hey Anew,

Thanks for chiming in on this. I do think that even putting in +1's can be useful if that's all that you have time for. It brings issues up to the top of the issue queue and demonstrates that there is interest. Writing more explicit support is always better of course.

There was a bit of a discussion I was having on twitter about how useful caption & summaries are for accessibility. I think they've so long been badly implemented that many people who depend on screen readers don't use them. That being said, it's quite a challenge to figure out what should go into core and how to set forums (and other table based data) up in a way that is as universally accessible as possible.

If you've got energy to look at a sandbox I've got set up, please let me know. I can send you admin access to it.

With your last point about support for inserting headers, are you referring to <thead> & <th> tags? I'm looking at the WC3. Or things like inserting <tbody> and <tfoot> as described by Bellevue College? Are there places where Drupal core uses <td> rather than <th> tags?

Thanks for your comments too Cliff, they are great.

headers attribute for <td> tags

aenw's picture

@mgifford: Yes, I'd like to look at your sandbox. I'll look forward to it.

I should have been more specific when I mentioned headers. I meant the headers attribute in

tags. (Here's the WCAG technique reference: H43) I know there's great overlap with the "scope" attribute. I picked the headers attribute to start with just because I needed to dive in someplace. (I'm starting to think the implementation for each would be greatly similar, or even could be accomplished in the same few functions; the user [web designer] would decide which to display (or both), I'd think.) (I started to spin off thoughts about the "headers" and "scope" attributes, and how these could be accomplished in core 7.0 and beyond. But I think these comments should go in a different thread.)

I'm also learning about the differences between the different screen readers and different versions of each, what attributes they do and don't pick up on, etc. This is just like coding for browser differences, except it seems like the readers are in a less mature phase than where the browsers finally are -- meaning there's less standardization or agreement, so the variances are wider. And it seems to me that there are more likely to be users with older versions of readers, since, unlike browsers, it's not always free to upgrade. Is this right? (Since I'm relatively new in this particular domain.)

And I'm not aware of places where drupal core uses

when should be used. But I confess I haven't looked with any great focus... yet.

Thanks for the clarification

mgifford's picture

Thanks for the clarification. At first I wasn't certain that was still supported in xhtml, but it seems to be:
http://www.w3.org/2010/04/xhtml10-strict.html#elem_td

I do wonder how often this is used in practice since it seems to be used so infrequently. It may well have been just a good idea that never got adopted.

Do you know of people that use the header attribute? I think we could add this well enough through the API. Would need to play with it, but I think its possible.

As far as where tables are used, all over the place. Just searching for:
grep -ir "theme('table'" modules/*

Got me a good list:
modules/aggregator/aggregator.admin.inc:
modules/aggregator/aggregator.pages.inc:
modules/book/book.admin.inc:
modules/field/field.form.inc:
modules/field_ui/field_ui.admin.inc:
modules/file/file.field.inc:
modules/filter/filter.admin.inc:
modules/filter/filter.module:
modules/image/image.admin.inc:
modules/locale/locale.admin.inc:
modules/menu/menu.admin.inc:
modules/node/node.module:
modules/poll/poll.module:
modules/profile/profile.admin.inc:
modules/shortcut/shortcut.admin.inc:
modules/shortcut/shortcut.admin.inc:
modules/system/theme.api.php:
modules/system/system.admin.inc:
modules/taxonomy/taxonomy.admin.inc:
modules/taxonomy/taxonomy.admin.inc:
modules/trigger/trigger.admin.inc: $
modules/update/update.manager.inc:
modules/update/update.report.inc:
modules/user/user.admin.inc:

Many of these are admin pages, but not all.

Headers & table use

mgifford's picture

Thanks for the clarification. At first I wasn't certain that was still supported in xhtml, but it seems to be:
http://www.w3.org/2010/04/xhtml10-strict.html#elem_td

I do wonder how often this is used in practice since it seems to be used so infrequently. It may well have been just a good idea that never got adopted.

Do you know of people that use the header attribute? I think we could add this well enough through the API. Would need to play with it, but I think its possible.

As far as where tables are used, all over the place. Just searching for:
grep -ir "theme('table'" modules/*

Got me a good list:
modules/aggregator/aggregator.admin.inc:
modules/aggregator/aggregator.pages.inc:
modules/book/book.admin.inc:
modules/field/field.form.inc:
modules/field_ui/field_ui.admin.inc:
modules/file/file.field.inc:
modules/filter/filter.admin.inc:
modules/filter/filter.module:
modules/image/image.admin.inc:
modules/locale/locale.admin.inc:
modules/menu/menu.admin.inc:
modules/node/node.module:
modules/poll/poll.module:
modules/profile/profile.admin.inc:
modules/shortcut/shortcut.admin.inc:
modules/shortcut/shortcut.admin.inc:
modules/system/theme.api.php:
modules/system/system.admin.inc:
modules/taxonomy/taxonomy.admin.inc:
modules/taxonomy/taxonomy.admin.inc:
modules/trigger/trigger.admin.inc: $
modules/update/update.manager.inc:
modules/update/update.report.inc:
modules/user/user.admin.inc:

Many of these are admin pages, but not all.

table scope versus headers attributes

bowersox's picture

According to the WebAIM article about creating accessible data tables, using the scope attribute is preferred over using the headers and id attributes. The article says, "[The headers and id method] should be used with tables of a more complex nature, where the scope attribute will not work."

It's my understanding that more AT tools have support for scope attributes than for the headers and id attributes. So that is something to consider when choosing how to mark up these tables properly.

Ok, so where should we insert scope then?

mgifford's picture

Ok, so how about this:
http://drupal.org/node/846550

That should work. Would be nice to have folks test it.

Ok, so where should we insert scope then?

mgifford's picture

Ok, so how about this:
http://drupal.org/node/846550

That should work. Would be nice to have folks test it.

summary attribute - scope and direction?

aenw's picture

Are there already thoughts out there about the scope and direction of a summary attribute?

Forums are the most common instance of data tables in core. Are they the only instance?

Re a summary attribute for a forum: Is it true that adding a summary for a forum means we need to track a new piece of data ( = adding a new column to a table in the database)? The summary is not quite like the description of a forum, in that the description can be long and, as the user is prompted in the UI for editing a forum, should be "Description and guidelines for discussions within this forum." So really, there should be an element on the 'edit forum' form: a text field for the forum summary, with a prompt for the user along the lines of "Type the main purpose of the forum in one or two brief sentences." And there could be an additional text field where the forum creator/editor can enter their own description of the structure, or leave blank to have drupal core generate it based on the columns shown for the forum. The prompt for that field might be "Enter a brief description of the structure of the forum (the columns), or leave blank to have Drupal create this description for you. This will be appended to the summary purpose and be presented as the value of the "summary" tag."

Is that along the lines of what should be done and/or could be done?

Forums are a useful start

mgifford's picture

Ya, it's good to start with the forums in core - http://drupal7.dev.openconcept.ca/forum

I don't see it in the aggregator (not the public view in any case) - http://drupal7.dev.openconcept.ca/aggregator

Or for that matter in the poll Module - http://drupal7.dev.openconcept.ca/node/2

There are a bunch of places on the admin side where tables are used for lists of data.

I don't think we'll be needing to modify the DB to accommodate the summary tables. Generally this would be defined in code I think or be dynamically generated.

I was thinking something much more general as far as what would be produced. With this table here:
http://drupal7.dev.openconcept.ca/forum

I think what needs to be conveyed is:
- The general type of data that is contained: "This table contains 2 categories and 1 forum"
- The structure of the data presented: "There are 4 columns in the category section of this table: Forum, Topics, Posts, Last post. Forum rows have only one column"

I think those are the critical elements. I'm not sure if there are other places where we need to be inserting summary or caption data.