summary attribute is not required on table in HTML5

This commit is contained in:
Michael[tm] Smith 2011-11-21 12:34:05 +09:00
parent dd7c635278
commit 4fdc30c120

View file

@ -763,21 +763,9 @@ void CheckAREA( TidyDocImpl* doc, Node *node )
void CheckTABLE( TidyDocImpl* doc, Node *node ) void CheckTABLE( TidyDocImpl* doc, Node *node )
{ {
AttVal* attval; AttVal* attval;
Bool HasSummary = TY_(AttrGetById)(node, TidyAttr_SUMMARY) != NULL;
TY_(CheckAttributes)(doc, node); TY_(CheckAttributes)(doc, node);
/* a missing summary attribute is bad accessibility, no matter
what HTML version is involved; a document without is valid */
if (cfg(doc, TidyAccessibilityCheckLevel) == 0)
{
if (!HasSummary)
{
doc->badAccess |= BA_MISSING_SUMMARY;
TY_(ReportMissingAttr)( doc, node, "summary");
}
}
/* convert <table border> to <table border="1"> */ /* convert <table border> to <table border="1"> */
if ( cfgBool(doc, TidyXmlOut) && (attval = TY_(AttrGetById)(node, TidyAttr_BORDER)) ) if ( cfgBool(doc, TidyXmlOut) && (attval = TY_(AttrGetById)(node, TidyAttr_BORDER)) )
{ {