table summary

For technical support for all editions of CSE HTML Validator. Includes bug reports.

table summary

Postby roedygr » Sun May 13, 2012 2:27 am

I would like to make missing table summaries a reportable warning. How do I go about this?
How would I scan the help for this info?
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 242
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: table summary

Postby Albert Wiersch » Mon May 14, 2012 8:57 am

Hello,

You could search the help for "summary" and it should come up with several pages. The most relevant would be the accessibility pages.

Also, I've seen conflicting info on the "summary" attribute and believe it may not be very helpful in practicality. The HTML5 spec at http://www.w3.org/TR/2011/WD-html5-2011 ... le-summary says:
In particular, authors are encouraged to consider whether their explanatory text for tables is likely to be useful to the visually impaired: if their text would not be useful, then it is best to not include a summary attribute. Similarly, if their explanatory text could help someone who is not visually impaired, e.g. someone who is seeing the table for the first time, then the text would be more useful before the table or in the caption. For example, describing the conclusions of the data in a table is useful to everyone; explaining how to read the table, if not obvious from the headers alone, is useful to everyone; describing the structure of the table, if it is easy to grasp visually, might not be useful to everyone, but it might also not be useful to users who can quickly navigate the table with an accessibility tool.


This thread is also interesting:
http://www.sitepoint.com/forums/showthr ... -attribute

Anyway, if you'd like to customize CSE HTML Validator to throw a warning for missing "summary" attributes for "table" tags, it would be easy to do using the user function onStartTag_table() in a user functions file which you can specify in Validator Engine Options->Validator Engine->Config File. It would look something like this:

Code: Select all
function onStartTag_table() {
 if !hasAtt("summary") {
  Message(1,$MSG_WARNING,'Missing "summary" attribute.');
 }
}


Using a user functions file will preserve your customizations through updates.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron