Updated the remaining items, including all of the accessibility module items.
Note that there are several regressions in the accessibility test suit that are not related to output messages. These are a result of previous work, and these results should be updated in the test suite when this item is merged.
This commit is contained in:
parent
832b4772ad
commit
d8220c061f
94
src/access.c
94
src/access.c
|
@ -506,19 +506,19 @@ static void CheckColorAvailable( TidyDocImpl* doc, Node* node )
|
|||
if (Level1_Enabled( doc ))
|
||||
{
|
||||
if ( nodeIsIMG(node) )
|
||||
TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_IMAGE );
|
||||
TY_(ReportAccessError)( doc, node, INFORMATION_NOT_CONVEYED_IMAGE );
|
||||
|
||||
else if ( nodeIsAPPLET(node) )
|
||||
TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_APPLET );
|
||||
TY_(ReportAccessError)( doc, node, INFORMATION_NOT_CONVEYED_APPLET );
|
||||
|
||||
else if ( nodeIsOBJECT(node) )
|
||||
TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_OBJECT );
|
||||
TY_(ReportAccessError)( doc, node, INFORMATION_NOT_CONVEYED_OBJECT );
|
||||
|
||||
else if ( nodeIsSCRIPT(node) )
|
||||
TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_SCRIPT );
|
||||
TY_(ReportAccessError)( doc, node, INFORMATION_NOT_CONVEYED_SCRIPT );
|
||||
|
||||
else if ( nodeIsINPUT(node) )
|
||||
TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_INPUT );
|
||||
TY_(ReportAccessError)( doc, node, INFORMATION_NOT_CONVEYED_INPUT );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -580,7 +580,7 @@ static void CheckColorContrast( TidyDocImpl* doc, Node* node )
|
|||
if ( GetRgb(av->value, rgbFG) &&
|
||||
!CompareColors(rgbBG, rgbFG) )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, errcode );
|
||||
TY_(ReportAccessError)( doc, node, errcode );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -738,25 +738,25 @@ static void CheckImage( TidyDocImpl* doc, Node* node )
|
|||
else if (TY_(tmbstrlen)(av->value) > 150)
|
||||
{
|
||||
HasAlt = yes;
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_TOO_LONG );
|
||||
TY_(ReportAccessError)( doc, node, IMG_ALT_SUSPICIOUS_TOO_LONG );
|
||||
}
|
||||
|
||||
else if (IsImage (av->value) == yes)
|
||||
{
|
||||
HasAlt = yes;
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_FILENAME);
|
||||
TY_(ReportAccessError)( doc, node, IMG_ALT_SUSPICIOUS_FILENAME);
|
||||
}
|
||||
|
||||
else if (IsPlaceholderAlt (av->value) == yes)
|
||||
{
|
||||
HasAlt = yes;
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_PLACEHOLDER);
|
||||
TY_(ReportAccessError)( doc, node, IMG_ALT_SUSPICIOUS_PLACEHOLDER);
|
||||
}
|
||||
|
||||
else if (EndsWithBytes (av->value) == yes)
|
||||
{
|
||||
HasAlt = yes;
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_FILE_SIZE);
|
||||
TY_(ReportAccessError)( doc, node, IMG_ALT_SUSPICIOUS_FILE_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -913,19 +913,19 @@ static void CheckImage( TidyDocImpl* doc, Node* node )
|
|||
if ((HasDLINK == yes)&&
|
||||
(HasLongDesc == no))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_MISSING_LONGDESC);
|
||||
TY_(ReportAccessError)( doc, node, IMG_MISSING_LONGDESC);
|
||||
}
|
||||
|
||||
if ((HasLongDesc == yes)&&
|
||||
(HasDLINK == no))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_MISSING_DLINK);
|
||||
TY_(ReportAccessError)( doc, node, IMG_MISSING_DLINK);
|
||||
}
|
||||
|
||||
if ((HasLongDesc == no)&&
|
||||
(HasDLINK == no))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_MISSING_LONGDESC_DLINK);
|
||||
TY_(ReportAccessError)( doc, node, IMG_MISSING_LONGDESC_DLINK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -933,7 +933,7 @@ static void CheckImage( TidyDocImpl* doc, Node* node )
|
|||
{
|
||||
TY_(ReportAccessError)( doc, node, IMAGE_MAP_SERVER_SIDE_REQUIRES_CONVERSION);
|
||||
|
||||
TY_(ReportAccessWarning)( doc, node, IMG_MAP_SERVER_REQUIRES_TEXT_LINKS);
|
||||
TY_(ReportAccessError)( doc, node, IMG_MAP_SERVER_REQUIRES_TEXT_LINKS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1180,7 +1180,7 @@ static void CheckFrame( TidyDocImpl* doc, Node* node )
|
|||
if ( doc->access.numFrames==3 && doc->access.HasCheckedLongDesc<3 )
|
||||
{
|
||||
doc->access.numFrames = 0;
|
||||
TY_(ReportAccessWarning)( doc, node, FRAME_MISSING_LONGDESC );
|
||||
TY_(ReportAccessError)( doc, node, FRAME_MISSING_LONGDESC );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1284,11 +1284,11 @@ static void CheckAnchorAccess( TidyDocImpl* doc, Node* node )
|
|||
{
|
||||
if (AttrValueIs(av, "_new"))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_NEW);
|
||||
TY_(ReportAccessError)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_NEW);
|
||||
}
|
||||
else if (AttrValueIs(av, "_blank"))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_BLANK);
|
||||
TY_(ReportAccessError)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_BLANK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1311,20 +1311,20 @@ static void CheckAnchorAccess( TidyDocImpl* doc, Node* node )
|
|||
|
||||
if (TY_(tmbstrcmp) (word, "click here") == 0)
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE);
|
||||
TY_(ReportAccessError)( doc, node, LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE);
|
||||
}
|
||||
|
||||
if (HasTriggeredLink == no)
|
||||
{
|
||||
if (TY_(tmbstrlen)(word) < 6)
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, LINK_TEXT_NOT_MEANINGFUL);
|
||||
TY_(ReportAccessError)( doc, node, LINK_TEXT_NOT_MEANINGFUL);
|
||||
}
|
||||
}
|
||||
|
||||
if (TY_(tmbstrlen)(word) > 60)
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, LINK_TEXT_TOO_LONG);
|
||||
TY_(ReportAccessError)( doc, node, LINK_TEXT_TOO_LONG);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1332,7 +1332,7 @@ static void CheckAnchorAccess( TidyDocImpl* doc, Node* node )
|
|||
|
||||
if (node->content == NULL)
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, LINK_TEXT_MISSING);
|
||||
TY_(ReportAccessError)( doc, node, LINK_TEXT_MISSING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1380,11 +1380,11 @@ static void CheckArea( TidyDocImpl* doc, Node* node )
|
|||
{
|
||||
if (AttrValueIs(av, "_new"))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_NEW);
|
||||
TY_(ReportAccessError)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_NEW);
|
||||
}
|
||||
else if (AttrValueIs(av, "_blank"))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_BLANK);
|
||||
TY_(ReportAccessError)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_BLANK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1539,14 +1539,14 @@ static void CheckTH( TidyDocImpl* doc, Node* node )
|
|||
(TY_(tmbstrlen)(av->value) == 0))
|
||||
{
|
||||
HasAbbr = yes;
|
||||
TY_(ReportAccessWarning)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR_NULL);
|
||||
TY_(ReportAccessError)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR_NULL);
|
||||
}
|
||||
|
||||
if ((IsWhitespace (av->value) == yes)&&
|
||||
(TY_(tmbstrlen)(av->value) > 0))
|
||||
{
|
||||
HasAbbr = yes;
|
||||
TY_(ReportAccessWarning)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES);
|
||||
TY_(ReportAccessError)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1561,7 +1561,7 @@ static void CheckTH( TidyDocImpl* doc, Node* node )
|
|||
if ((TY_(tmbstrlen)(word) > 15)&&
|
||||
(HasAbbr == no))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR);
|
||||
TY_(ReportAccessError)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1644,13 +1644,13 @@ static void CheckMultiHeaders( TidyDocImpl* doc, Node* node )
|
|||
/* Displays HTML 4 Table Algorithm when multiple column of headers used */
|
||||
if (validColSpanRows == no)
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS );
|
||||
TY_(ReportAccessError)( doc, node, DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS );
|
||||
TY_(DialogueMessage)( doc, TEXT_HTML_T_ALGORITHM, TidyDialogueDoc );
|
||||
}
|
||||
|
||||
if (validColSpanColumns == no)
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS );
|
||||
TY_(ReportAccessError)( doc, node, DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS );
|
||||
TY_(DialogueMessage)( doc, TEXT_HTML_T_ALGORITHM, TidyDialogueDoc );
|
||||
}
|
||||
}
|
||||
|
@ -1805,13 +1805,13 @@ static void CheckTable( TidyDocImpl* doc, Node* node )
|
|||
|
||||
if (numTR == 1)
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, LAYOUT_TABLES_LINEARIZE_PROPERLY);
|
||||
TY_(ReportAccessError)( doc, node, LAYOUT_TABLES_LINEARIZE_PROPERLY);
|
||||
}
|
||||
}
|
||||
|
||||
if ( doc->access.HasTH )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, LAYOUT_TABLE_INVALID_MARKUP);
|
||||
TY_(ReportAccessError)( doc, node, LAYOUT_TABLE_INVALID_MARKUP);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2216,10 +2216,10 @@ static void CheckHeaderNesting( TidyDocImpl* doc, Node* node )
|
|||
}
|
||||
|
||||
if ( !IsValidIncrease )
|
||||
TY_(ReportAccessWarning)( doc, node, HEADERS_IMPROPERLY_NESTED );
|
||||
TY_(ReportAccessError)( doc, node, HEADERS_IMPROPERLY_NESTED );
|
||||
|
||||
if ( NeedsDescription )
|
||||
TY_(ReportAccessWarning)( doc, node, HEADER_USED_FORMAT_TEXT );
|
||||
TY_(ReportAccessError)( doc, node, HEADER_USED_FORMAT_TEXT );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2262,17 +2262,17 @@ static void CheckParagraphHeader( TidyDocImpl* doc, Node* node )
|
|||
{
|
||||
if ( nodeIsSTRONG(node->content) )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, POTENTIAL_HEADER_BOLD);
|
||||
TY_(ReportAccessError)( doc, node, POTENTIAL_HEADER_BOLD);
|
||||
}
|
||||
|
||||
if ( nodeIsU(node->content) )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, POTENTIAL_HEADER_UNDERLINE);
|
||||
TY_(ReportAccessError)( doc, node, POTENTIAL_HEADER_UNDERLINE);
|
||||
}
|
||||
|
||||
if ( nodeIsEM(node->content) )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, POTENTIAL_HEADER_ITALICS);
|
||||
TY_(ReportAccessError)( doc, node, POTENTIAL_HEADER_ITALICS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2408,7 +2408,7 @@ static void CheckLink( TidyDocImpl* doc, Node* node )
|
|||
}
|
||||
|
||||
if (HasRel && HasType)
|
||||
TY_(ReportAccessWarning)( doc, node, STYLESHEETS_REQUIRE_TESTING_LINK );
|
||||
TY_(ReportAccessError)( doc, node, STYLESHEETS_REQUIRE_TESTING_LINK );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2424,7 +2424,7 @@ static void CheckStyle( TidyDocImpl* doc, Node* node )
|
|||
{
|
||||
if (Level1_Enabled( doc ))
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, STYLESHEETS_REQUIRE_TESTING_STYLE_ELEMENT );
|
||||
TY_(ReportAccessError)( doc, node, STYLESHEETS_REQUIRE_TESTING_STYLE_ELEMENT );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2450,7 +2450,7 @@ static void DynamicContent( TidyDocImpl* doc, Node* node )
|
|||
msgcode = TEXT_EQUIVALENTS_REQUIRE_UPDATING_OBJECT;
|
||||
|
||||
if ( msgcode )
|
||||
TY_(ReportAccessWarning)( doc, node, msgcode );
|
||||
TY_(ReportAccessError)( doc, node, msgcode );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2477,7 +2477,7 @@ static void ProgrammaticObjects( TidyDocImpl* doc, Node* node )
|
|||
msgcode = PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_APPLET;
|
||||
|
||||
if ( msgcode )
|
||||
TY_(ReportAccessWarning)( doc, node, msgcode );
|
||||
TY_(ReportAccessError)( doc, node, msgcode );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2503,7 +2503,7 @@ static void AccessibleCompatible( TidyDocImpl* doc, Node* node )
|
|||
msgcode = ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_APPLET;
|
||||
|
||||
if ( msgcode )
|
||||
TY_(ReportAccessWarning)( doc, node, msgcode );
|
||||
TY_(ReportAccessError)( doc, node, msgcode );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2586,7 +2586,7 @@ static void CheckFlicker( TidyDocImpl* doc, Node* node )
|
|||
}
|
||||
|
||||
if ( msgcode )
|
||||
TY_(ReportAccessWarning)( doc, node, msgcode );
|
||||
TY_(ReportAccessError)( doc, node, msgcode );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2935,7 +2935,7 @@ static void CheckForStyleAttribute( TidyDocImpl* doc, Node* node )
|
|||
AttVal* style = attrGetSTYLE( node );
|
||||
if ( hasValue(style) )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, STYLESHEETS_REQUIRE_TESTING_STYLE_ATTR );
|
||||
TY_(ReportAccessError)( doc, node, STYLESHEETS_REQUIRE_TESTING_STYLE_ATTR );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2999,9 +2999,9 @@ static void CheckListUsage( TidyDocImpl* doc, Node* node )
|
|||
** IFF OL/UL node is implicit
|
||||
*/
|
||||
if ( !nodeIsLI(node->content) ) {
|
||||
TY_(ReportAccessWarning)( doc, node, msgcode );
|
||||
TY_(ReportAccessError)( doc, node, msgcode );
|
||||
} else if ( node->implicit ) { /* if a tidy added node */
|
||||
TY_(ReportAccessWarning)( doc, node, LIST_USAGE_INVALID_LI );
|
||||
TY_(ReportAccessError)( doc, node, LIST_USAGE_INVALID_LI );
|
||||
}
|
||||
}
|
||||
else if ( nodeIsLI(node) )
|
||||
|
@ -3017,13 +3017,13 @@ static void CheckListUsage( TidyDocImpl* doc, Node* node )
|
|||
if ( node->parent == NULL ||
|
||||
( !nodeIsOL(node->parent) && !nodeIsUL(node->parent) ) )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, node, LIST_USAGE_INVALID_LI );
|
||||
TY_(ReportAccessError)( doc, node, LIST_USAGE_INVALID_LI );
|
||||
} else if ( node->implicit && node->parent &&
|
||||
( nodeIsOL(node->parent) || nodeIsUL(node->parent) ) ) {
|
||||
/* if tidy added LI node, then */
|
||||
msgcode = nodeIsUL(node->parent) ?
|
||||
LIST_USAGE_INVALID_UL : LIST_USAGE_INVALID_OL;
|
||||
TY_(ReportAccessWarning)( doc, node, msgcode );
|
||||
TY_(ReportAccessError)( doc, node, msgcode );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3306,7 +3306,7 @@ void TY_(AccessibilityChecks)( TidyDocImpl* doc )
|
|||
if ( Level2_Enabled( doc )
|
||||
&& ! CheckMissingStyleSheets( doc, &doc->root ) )
|
||||
{
|
||||
TY_(ReportAccessWarning)( doc, &doc->root, STYLE_SHEET_CONTROL_PRESENTATION );
|
||||
TY_(ReportAccessError)( doc, &doc->root, STYLE_SHEET_CONTROL_PRESENTATION );
|
||||
}
|
||||
|
||||
/* Check to see if any list elements are found within the document */
|
||||
|
|
166
src/message.c
166
src/message.c
|
@ -235,6 +235,7 @@ typedef TidyMessageImpl*(messageFormatter)(TidyDocImpl* doc, Node *element, Node
|
|||
|
||||
|
||||
/* Forward declarations of messageFormatter functions. */
|
||||
static messageFormatter formatAccessReport;
|
||||
static messageFormatter formatAttributeReport;
|
||||
static messageFormatter formatEncodingReport;
|
||||
static messageFormatter formatStandard;
|
||||
|
@ -352,6 +353,127 @@ static struct _dispatchTable {
|
|||
{ WHITE_IN_URI, TidyWarning, formatAttributeReport },
|
||||
{ XML_DECLARATION_DETECTED, TidyWarning, formatStandard },
|
||||
{ XML_ID_SYNTAX, TidyWarning, formatAttributeReport },
|
||||
|
||||
{ APPLET_MISSING_ALT, TidyAccess, formatAccessReport },
|
||||
{ AREA_MISSING_ALT, TidyAccess, formatAccessReport },
|
||||
{ ASCII_REQUIRES_DESCRIPTION, TidyAccess, formatAccessReport },
|
||||
{ ASSOCIATE_LABELS_EXPLICITLY, TidyAccess, formatAccessReport },
|
||||
{ ASSOCIATE_LABELS_EXPLICITLY_FOR, TidyAccess, formatAccessReport },
|
||||
{ ASSOCIATE_LABELS_EXPLICITLY_ID, TidyAccess, formatAccessReport },
|
||||
{ AUDIO_MISSING_TEXT_AIFF, TidyAccess, formatAccessReport },
|
||||
{ AUDIO_MISSING_TEXT_AU, TidyAccess, formatAccessReport },
|
||||
{ AUDIO_MISSING_TEXT_RA, TidyAccess, formatAccessReport },
|
||||
{ AUDIO_MISSING_TEXT_RM, TidyAccess, formatAccessReport },
|
||||
{ AUDIO_MISSING_TEXT_SND, TidyAccess, formatAccessReport },
|
||||
{ AUDIO_MISSING_TEXT_WAV, TidyAccess, formatAccessReport },
|
||||
{ COLOR_CONTRAST_ACTIVE_LINK, TidyAccess, formatAccessReport },
|
||||
{ COLOR_CONTRAST_LINK, TidyAccess, formatAccessReport },
|
||||
{ COLOR_CONTRAST_TEXT, TidyAccess, formatAccessReport },
|
||||
{ COLOR_CONTRAST_VISITED_LINK, TidyAccess, formatAccessReport },
|
||||
{ DATA_TABLE_MISSING_HEADERS, TidyAccess, formatAccessReport },
|
||||
{ DATA_TABLE_MISSING_HEADERS_COLUMN, TidyAccess, formatAccessReport },
|
||||
{ DATA_TABLE_MISSING_HEADERS_ROW, TidyAccess, formatAccessReport },
|
||||
{ DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS, TidyAccess, formatAccessReport },
|
||||
{ DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS, TidyAccess, formatAccessReport },
|
||||
{ DOCTYPE_MISSING, TidyAccess, formatAccessReport },
|
||||
{ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_APPLET, TidyAccess, formatAccessReport },
|
||||
{ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_EMBED, TidyAccess, formatAccessReport },
|
||||
{ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_OBJECT, TidyAccess, formatAccessReport },
|
||||
{ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_SCRIPT, TidyAccess, formatAccessReport },
|
||||
{ FRAME_MISSING_LONGDESC, TidyAccess, formatAccessReport },
|
||||
{ FRAME_MISSING_NOFRAMES, TidyAccess, formatAccessReport },
|
||||
{ FRAME_MISSING_TITLE, TidyAccess, formatAccessReport },
|
||||
{ FRAME_SRC_INVALID, TidyAccess, formatAccessReport },
|
||||
{ FRAME_TITLE_INVALID_NULL, TidyAccess, formatAccessReport },
|
||||
{ FRAME_TITLE_INVALID_SPACES, TidyAccess, formatAccessReport },
|
||||
{ HEADER_USED_FORMAT_TEXT, TidyAccess, formatAccessReport },
|
||||
{ HEADERS_IMPROPERLY_NESTED, TidyAccess, formatAccessReport },
|
||||
{ IMAGE_MAP_SERVER_SIDE_REQUIRES_CONVERSION, TidyAccess, formatAccessReport },
|
||||
{ IMG_ALT_SUSPICIOUS_FILE_SIZE, TidyAccess, formatAccessReport },
|
||||
{ IMG_ALT_SUSPICIOUS_FILENAME, TidyAccess, formatAccessReport },
|
||||
{ IMG_ALT_SUSPICIOUS_PLACEHOLDER, TidyAccess, formatAccessReport },
|
||||
{ IMG_ALT_SUSPICIOUS_TOO_LONG, TidyAccess, formatAccessReport },
|
||||
{ IMG_BUTTON_MISSING_ALT, TidyAccess, formatAccessReport },
|
||||
{ IMG_MAP_CLIENT_MISSING_TEXT_LINKS, TidyAccess, formatAccessReport },
|
||||
{ IMG_MAP_SERVER_REQUIRES_TEXT_LINKS, TidyAccess, formatAccessReport },
|
||||
{ IMG_MISSING_ALT, TidyAccess, formatAccessReport },
|
||||
{ IMG_MISSING_DLINK, TidyAccess, formatAccessReport },
|
||||
{ IMG_MISSING_LONGDESC, TidyAccess, formatAccessReport },
|
||||
{ IMG_MISSING_LONGDESC_DLINK, TidyAccess, formatAccessReport },
|
||||
{ INFORMATION_NOT_CONVEYED_APPLET, TidyAccess, formatAccessReport },
|
||||
{ INFORMATION_NOT_CONVEYED_IMAGE, TidyAccess, formatAccessReport },
|
||||
{ INFORMATION_NOT_CONVEYED_INPUT, TidyAccess, formatAccessReport },
|
||||
{ INFORMATION_NOT_CONVEYED_OBJECT, TidyAccess, formatAccessReport },
|
||||
{ INFORMATION_NOT_CONVEYED_SCRIPT, TidyAccess, formatAccessReport },
|
||||
{ LANGUAGE_INVALID, TidyAccess, formatAccessReport },
|
||||
{ LANGUAGE_NOT_IDENTIFIED, TidyAccess, formatAccessReport },
|
||||
{ LAYOUT_TABLE_INVALID_MARKUP, TidyAccess, formatAccessReport },
|
||||
{ LAYOUT_TABLES_LINEARIZE_PROPERLY, TidyAccess, formatAccessReport },
|
||||
{ LINK_TEXT_MISSING, TidyAccess, formatAccessReport },
|
||||
{ LINK_TEXT_NOT_MEANINGFUL, TidyAccess, formatAccessReport },
|
||||
{ LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE, TidyAccess, formatAccessReport },
|
||||
{ LINK_TEXT_TOO_LONG, TidyAccess, formatAccessReport },
|
||||
{ LIST_USAGE_INVALID_LI, TidyAccess, formatAccessReport },
|
||||
{ LIST_USAGE_INVALID_OL, TidyAccess, formatAccessReport },
|
||||
{ LIST_USAGE_INVALID_UL, TidyAccess, formatAccessReport },
|
||||
{ METADATA_MISSING, TidyAccess, formatAccessReport },
|
||||
{ METADATA_MISSING_REDIRECT_AUTOREFRESH, TidyAccess, formatAccessReport },
|
||||
{ MULTIMEDIA_REQUIRES_TEXT, TidyAccess, formatAccessReport },
|
||||
{ NEW_WINDOWS_REQUIRE_WARNING_BLANK, TidyAccess, formatAccessReport },
|
||||
{ NEW_WINDOWS_REQUIRE_WARNING_NEW, TidyAccess, formatAccessReport },
|
||||
{ NOFRAMES_INVALID_CONTENT, TidyAccess, formatAccessReport },
|
||||
{ NOFRAMES_INVALID_LINK, TidyAccess, formatAccessReport },
|
||||
{ NOFRAMES_INVALID_NO_VALUE, TidyAccess, formatAccessReport },
|
||||
{ OBJECT_MISSING_ALT, TidyAccess, formatAccessReport },
|
||||
{ POTENTIAL_HEADER_BOLD, TidyAccess, formatAccessReport },
|
||||
{ POTENTIAL_HEADER_ITALICS, TidyAccess, formatAccessReport },
|
||||
{ POTENTIAL_HEADER_UNDERLINE, TidyAccess, formatAccessReport },
|
||||
{ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_APPLET, TidyAccess, formatAccessReport },
|
||||
{ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_EMBED, TidyAccess, formatAccessReport },
|
||||
{ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_OBJECT, TidyAccess, formatAccessReport },
|
||||
{ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_SCRIPT, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_AUTO_REDIRECT, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_AUTO_REFRESH, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_BLINK_MARQUEE, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_FLICKER_ANIMATED_GIF, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_FLICKER_APPLET, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_FLICKER_EMBED, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_FLICKER_OBJECT, TidyAccess, formatAccessReport },
|
||||
{ REMOVE_FLICKER_SCRIPT, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_APPLET, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_BASEFONT, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_CENTER, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_DIR, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_FONT, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_ISINDEX, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_MENU, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_S, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_STRIKE, TidyAccess, formatAccessReport },
|
||||
{ REPLACE_DEPRECATED_HTML_U, TidyAccess, formatAccessReport },
|
||||
{ SCRIPT_MISSING_NOSCRIPT, TidyAccess, formatAccessReport },
|
||||
{ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_CLICK, TidyAccess, formatAccessReport },
|
||||
{ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_DOWN, TidyAccess, formatAccessReport },
|
||||
{ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_MOVE, TidyAccess, formatAccessReport },
|
||||
{ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OUT, TidyAccess, formatAccessReport },
|
||||
{ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OVER, TidyAccess, formatAccessReport },
|
||||
{ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_UP, TidyAccess, formatAccessReport },
|
||||
{ SKIPOVER_ASCII_ART, TidyAccess, formatAccessReport },
|
||||
{ STYLE_SHEET_CONTROL_PRESENTATION, TidyAccess, formatAccessReport },
|
||||
{ STYLESHEETS_REQUIRE_TESTING_LINK, TidyAccess, formatAccessReport },
|
||||
{ STYLESHEETS_REQUIRE_TESTING_STYLE_ATTR, TidyAccess, formatAccessReport },
|
||||
{ STYLESHEETS_REQUIRE_TESTING_STYLE_ELEMENT, TidyAccess, formatAccessReport },
|
||||
{ TABLE_MAY_REQUIRE_HEADER_ABBR, TidyAccess, formatAccessReport },
|
||||
{ TABLE_MAY_REQUIRE_HEADER_ABBR_NULL, TidyAccess, formatAccessReport },
|
||||
{ TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES, TidyAccess, formatAccessReport },
|
||||
{ TABLE_MISSING_CAPTION, TidyAccess, formatAccessReport },
|
||||
{ TABLE_MISSING_SUMMARY, TidyAccess, formatAccessReport },
|
||||
{ TABLE_SUMMARY_INVALID_NULL, TidyAccess, formatAccessReport },
|
||||
{ TABLE_SUMMARY_INVALID_PLACEHOLDER, TidyAccess, formatAccessReport },
|
||||
{ TABLE_SUMMARY_INVALID_SPACES, TidyAccess, formatAccessReport },
|
||||
{ TEXT_EQUIVALENTS_REQUIRE_UPDATING_APPLET, TidyAccess, formatAccessReport },
|
||||
{ TEXT_EQUIVALENTS_REQUIRE_UPDATING_OBJECT, TidyAccess, formatAccessReport },
|
||||
{ TEXT_EQUIVALENTS_REQUIRE_UPDATING_SCRIPT, TidyAccess, formatAccessReport },
|
||||
|
||||
{ 0, 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -363,6 +485,13 @@ static struct _dispatchTable {
|
|||
*********************************************************************/
|
||||
|
||||
|
||||
/* Provides formatting for the Attribute-related reports. */
|
||||
TidyMessageImpl *formatAccessReport(TidyDocImpl* doc, Node *element, Node *node, uint code, uint level, va_list args)
|
||||
{
|
||||
doc->badAccess |= BA_WAI;
|
||||
return TY_(tidyMessageCreateWithNode)(doc, node, code, level );
|
||||
}
|
||||
|
||||
/* Provides formatting for the Attribute-related reports. */
|
||||
TidyMessageImpl *formatAttributeReport(TidyDocImpl* doc, Node *element, Node *node, uint code, uint level, va_list args)
|
||||
{
|
||||
|
@ -768,6 +897,13 @@ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...)
|
|||
* and help protect type safety by avoiding variable arguments.
|
||||
*********************************************************************/
|
||||
|
||||
#if SUPPORT_ACCESSIBILITY_CHECKS
|
||||
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code )
|
||||
{
|
||||
TY_(Report)( doc, NULL, node, code );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code)
|
||||
{
|
||||
|
@ -1186,36 +1322,6 @@ uint TY_(getNextErrorCode)( TidyIterator* iter )
|
|||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* Accessibility Module
|
||||
* These methods are part of the accessibility module access.h/c.
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
#if SUPPORT_ACCESSIBILITY_CHECKS
|
||||
|
||||
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code )
|
||||
{
|
||||
TidyMessageImpl *message = NULL;
|
||||
|
||||
doc->badAccess |= BA_WAI;
|
||||
message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyAccess );
|
||||
messageOut(message);
|
||||
}
|
||||
|
||||
|
||||
void TY_(ReportAccessWarning)( TidyDocImpl* doc, Node* node, uint code )
|
||||
{
|
||||
TidyMessageImpl *message = NULL;
|
||||
|
||||
doc->badAccess |= BA_WAI;
|
||||
message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyAccess );
|
||||
messageOut(message);
|
||||
}
|
||||
|
||||
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* Documentation of configuration options
|
||||
*
|
||||
|
|
|
@ -55,6 +55,10 @@ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...);
|
|||
/** @{ */
|
||||
|
||||
|
||||
#if SUPPORT_ACCESSIBILITY_CHECKS
|
||||
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code );
|
||||
#endif
|
||||
|
||||
void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code);
|
||||
void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option );
|
||||
void TY_(ReportEntityError)( TidyDocImpl* doc, uint code, ctmbstr entity, int c );
|
||||
|
@ -66,19 +70,6 @@ void TY_(ReportSurrogateError)(TidyDocImpl* doc, uint code, uint c1, uint c2);
|
|||
void TY_(ReportUnknownOption)( TidyDocImpl* doc, ctmbstr option );
|
||||
|
||||
|
||||
/** @} */
|
||||
/** @name Legacy High Level Message Writing Functions - Specific */
|
||||
/** @{ */
|
||||
|
||||
|
||||
#if SUPPORT_ACCESSIBILITY_CHECKS
|
||||
|
||||
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code );
|
||||
void TY_(ReportAccessWarning)( TidyDocImpl* doc, Node* node, uint code );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/** @} */
|
||||
/** @name Output Dialogue Information */
|
||||
/** @{ */
|
||||
|
|
Loading…
Reference in a new issue