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?
table summary
- Albert Wiersch
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
- Contact:
Re: table summary
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:
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:
Using a user functions file will preserve your customizations through updates.
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:
This thread is also interesting: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.
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.');
}
}
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial