-
Notifications
You must be signed in to change notification settings - Fork 429
Is it time to bring back the table missing summary warning? #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See the thread https://lists.w3.org/Archives/Public/html-tidy/2015AprJun/0009.html for some discussion on alternatives to this table summary attribute... |
I would vote for supporting only html5. This is tidy-html5 |
@skynet thanks for the comment. I would agree supporting html5, but there are still some questions. I have constructed 4 test files, all with a table, and put them to the W3C validator, and to tidy 4.9.32 and show the results - (NWORE = No warnings or errors were found)
Test 2 shows me the validator is serious about Here I suggest a new warning like And also for case 3, when the document is NOT html5, output the usual summary warning, even though the validator sees nothing wrong. That is restoring tidy's previous behaviour. Anyway, baring any convincing comments to the contrary, this is how I will proceed. |
This new warning will only be seen if the document remains in HTML5 mode, where the summary attribute is obsolete. The W3C validator flags this as an error, and suggests 'Consider describing the structure of the table in a caption element or in a figure element containing the table; or simplify the structure of the table so that no description is needed'. At the same time this patch also restored the old warning if the document is HTML4--, if the table element lacks a summary attribute. This has been a tidy warning since the beginning of time, although the W3C validator does not presently flag this.
It's done ;=)) Bumped version to 4.9.33 for this change. 1. in_210-1.html - html5, no summary - remains NWORE
2. in_210-2.html - html5, with summary - NEW WARNING
3. in_210-3.html - html4, no summary - OLD WARNING retored
4. in_210-4.html - html4, with summary - NWORE
Look forward to testing and comments... |
No comments for a few weeks, so closing this for now... Feel free to re-open, or post a new issue. |
A post on
html-tidy@w3.org
https://lists.w3.org/Archives/Public/html-tidy/2015AprJun/0009.html caused me to look deeper into the code concerning this missing table summary warning.As stated in my reply, there are perhaps 2, or more, bugs here!
Case 1: First at present tidy5 no longer emits this warning in ANY case, which may be fine for html5 mode... But is it?
Case 2: Conversely, if the document IS html5, and you DO add a summary attribute, tidy5 does NOT warn that the summary attribute is not supported in HTML5 ;=(( Should it?
Case 3: Further, if the doctype declares the document as an earlier doctype, like say 4.01 strict, or transitional, htm4--, tidy5 still does not emit the warning ;=(( Should it?
The missing summary warning was REMOVED back on Nov 21, 2011, commit/4fdc30c (4fdc30c) by @sideshowbarker, with the comment "summary attribute is not required on table in HTML5". That seems fine if tidy5 was only ever meant to support html5...
But now we want it to support ALL html, so is it time to bring back this warning?
Should it ALWAYS be there as it was in tidy before 2011?
Or should an appropriate warning ONLY be issued for Cases 2 and/or 3 above?
Or other ideas...
I seek comments in this before jumping down a path ;=)).
The text was updated successfully, but these errors were encountered: