~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

TidyLib
tidy/src/access.h

Version: ~ [ 1.0 ] ~

** Warning: Cannot open xref database.

1 #ifndef __ACCESS_H__ 2 #define __ACCESS_H__ 3 4 /* access.h -- carry out accessibility checks 5 6 Copyright University of Toronto 7 Portions (c) 1998-2003 (W3C) MIT, ERCIM, Keio University 8 See tidy.h for the copyright notice. 9 10 CVS Info : 11 12 $Author: terry_teague $ 13 $Date: 2004/03/19 03:03:46 $ 14 $Revision: 1.5 $ 15 16 */ 17 18 /********************************************************************* 19 * AccessibilityChecks 20 * 21 * Carries out processes for all accessibility checks. Traverses 22 * through all the content within the tree and evaluates the tags for 23 * accessibility. 24 * 25 * To perform the following checks, 'AccessibilityChecks' must be 26 * called AFTER the tree structure has been formed. 27 * 28 * If, in the command prompt, there is no specification of which 29 * accessibility priorities to check, no accessibility checks will be 30 * performed. (ie. '1' for priority 1, '2' for priorities 1 and 2, 31 * and '3') for priorities 1, 2 and 3.) 32 * 33 * Copyright University of Toronto 34 * Programmed by: Mike Lam and Chris Ridpath 35 * Modifications by : Terry Teague (TRT) 36 * 37 *********************************************************************/ 38 39 40 #include "forward.h" 41 42 #if SUPPORT_ACCESSIBILITY_CHECKS 43 44 /* The accessibility checks to perform depending on user's desire. 45 46 1. priority 1 47 2. priority 1 & 2 48 3. priority 1, 2, & 3 49 */ 50 51 /* Determines if the client-side text link is found within the document 52 typedef struct AreaLinks 53 { 54 struct AreaLinks* next; 55 char* link; 56 Bool HasBeenFound; 57 } AreaLinks; 58 */ 59 60 #define TEXTBUF_SIZE 128 61 62 struct _TidyAccessImpl; 63 typedef struct _TidyAccessImpl TidyAccessImpl; 64 65 struct _TidyAccessImpl 66 { 67 /* gets set from Tidy variable AccessibilityCheckLevel */ 68 int PRIORITYCHK; 69 70 /* Number of characters that are found within the concatenated text */ 71 int counter; 72 73 /* list of characters in the text nodes found within a container element */ 74 tmbchar textNode[ TEXTBUF_SIZE ]; 75 76 /* The list of characters found within one text node */ 77 tmbchar text[ TEXTBUF_SIZE ]; 78 79 /* Number of frame elements found within a frameset */ 80 int numFrames; 81 82 /* Number of 'longdesc' attributes found within a frameset */ 83 int HasCheckedLongDesc; 84 85 int CheckedHeaders; 86 int ListElements; 87 int OtherListElements; 88 89 /* For 'USEMAP' identifier */ 90 Bool HasUseMap; 91 Bool HasName; 92 Bool HasMap; 93 94 /* For tracking nodes that are deleted from the original parse tree - TRT */ 95 /* Node *access_tree; */ 96 97 Bool HasTH; 98 Bool HasValidFor; 99 Bool HasValidId; 100 Bool HasValidRowHeaders; 101 Bool HasValidColumnHeaders; 102 Bool HasInvalidRowHeader; 103 Bool HasInvalidColumnHeader; 104 int ForID; 105 106 /* List containing map-links 107 AreaLinks* links; 108 AreaLinks* start; 109 AreaLinks* current; 110 */ 111 112 }; 113 114 115 /* 116 Determines which error/warning message should be displayed, 117 depending on the error code that was called. 118 119 Offset accessibility error codes by FIRST_ACCESS_ERR to avoid conflict with 120 other error codes defined in message.h and used in localize.c. 121 */ 122 enum accessErrorCodes 123 { 124 FIRST_ACCESS_ERR = 1000, /* must be first */ 125 126 /* [1.1.1.1] */ IMG_MISSING_ALT, 127 /* [1.1.1.2] */ IMG_ALT_SUSPICIOUS_FILENAME, 128 /* [1.1.1.3] */ IMG_ALT_SUSPICIOUS_FILE_SIZE, 129 /* [1.1.1.4] */ IMG_ALT_SUSPICIOUS_PLACEHOLDER, 130 /* [1.1.1.10] */ IMG_ALT_SUSPICIOUS_TOO_LONG, 131 /* [1.1.1.11] */ IMG_MISSING_ALT_BULLET, 132 /* [1.1.1.12] */ IMG_MISSING_ALT_H_RULE, 133 /* [1.1.2.1] */ IMG_MISSING_LONGDESC_DLINK, 134 /* [1.1.2.2] */ IMG_MISSING_DLINK, 135 /* [1.1.2.3] */ IMG_MISSING_LONGDESC, 136 /* [1.1.2.5] */ LONGDESC_NOT_REQUIRED, 137 /* [1.1.3.1] */ IMG_BUTTON_MISSING_ALT, 138 /* [1.1.4.1] */ APPLET_MISSING_ALT, 139 /* [1.1.5.1] */ OBJECT_MISSING_ALT, 140 /* [1.1.6.1] */ AUDIO_MISSING_TEXT_WAV, 141 /* [1.1.6.2] */ AUDIO_MISSING_TEXT_AU, 142 /* [1.1.6.3] */ AUDIO_MISSING_TEXT_AIFF, 143 /* [1.1.6.4] */ AUDIO_MISSING_TEXT_SND, 144 /* [1.1.6.5] */ AUDIO_MISSING_TEXT_RA, 145 /* [1.1.6.6] */ AUDIO_MISSING_TEXT_RM, 146 /* [1.1.8.1] */ FRAME_MISSING_LONGDESC, 147 /* [1.1.9.1] */ AREA_MISSING_ALT, 148 /* [1.1.10.1] */ SCRIPT_MISSING_NOSCRIPT, 149 /* [1.1.12.1] */ ASCII_REQUIRES_DESCRIPTION, 150 /* [1.2.1.1] */ IMG_MAP_SERVER_REQUIRES_TEXT_LINKS, 151 /* [1.4.1.1] */ MULTIMEDIA_REQUIRES_TEXT, 152 /* [1.5.1.1] */ IMG_MAP_CLIENT_MISSING_TEXT_LINKS, 153 /* [2.1.1.1] */ INFORMATION_NOT_CONVEYED_IMAGE, 154 /* [2.1.1.2] */ INFORMATION_NOT_CONVEYED_APPLET, 155 /* [2.1.1.3] */ INFORMATION_NOT_CONVEYED_OBJECT, 156 /* [2.1.1.4] */ INFORMATION_NOT_CONVEYED_SCRIPT, 157 /* [2.1.1.5] */ INFORMATION_NOT_CONVEYED_INPUT, 158 /* [2.2.1.1] */ COLOR_CONTRAST_TEXT, 159 /* [2.2.1.2] */ COLOR_CONTRAST_LINK, 160 /* [2.2.1.3] */ COLOR_CONTRAST_ACTIVE_LINK, 161 /* [2.2.1.4] */ COLOR_CONTRAST_VISITED_LINK, 162 /* [3.2.1.1] */ DOCTYPE_MISSING, 163 /* [3.3.1.1] */ STYLE_SHEET_CONTROL_PRESENTATION, 164 /* [3.5.1.1] */ HEADERS_IMPROPERLY_NESTED, 165 /* [3.5.2.1] */ POTENTIAL_HEADER_BOLD, 166 /* [3.5.2.2] */ POTENTIAL_HEADER_ITALICS, 167 /* [3.5.2.3] */ POTENTIAL_HEADER_UNDERLINE, 168 /* [3.5.3.1] */ HEADER_USED_FORMAT_TEXT, 169 /* [3.6.1.1] */ LIST_USAGE_INVALID_UL, 170 /* [3.6.1.2] */ LIST_USAGE_INVALID_OL, 171 /* [3.6.1.4] */ LIST_USAGE_INVALID_LI, 172 /* [4.1.1.1] */ INDICATE_CHANGES_IN_LANGUAGE, 173 /* [4.3.1.1] */ LANGUAGE_NOT_IDENTIFIED, 174 /* [4.3.1.1] */ LANGUAGE_INVALID, 175 /* [5.1.2.1] */ DATA_TABLE_MISSING_HEADERS, 176 /* [5.1.2.2] */ DATA_TABLE_MISSING_HEADERS_COLUMN, 177 /* [5.1.2.3] */ DATA_TABLE_MISSING_HEADERS_ROW, 178 /* [5.2.1.1] */ DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS, 179 /* [5.2.1.2] */ DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS, 180 /* [5.3.1.1] */ LAYOUT_TABLES_LINEARIZE_PROPERLY, 181 /* [5.4.1.1] */ LAYOUT_TABLE_INVALID_MARKUP, 182 /* [5.5.1.1] */ TABLE_MISSING_SUMMARY, 183 /* [5.5.1.2] */ TABLE_SUMMARY_INVALID_NULL, 184 /* [5.5.1.3] */ TABLE_SUMMARY_INVALID_SPACES, 185 /* [5.5.1.6] */ TABLE_SUMMARY_INVALID_PLACEHOLDER, 186 /* [5.5.2.1] */ TABLE_MISSING_CAPTION, 187 /* [5.6.1.1] */ TABLE_MAY_REQUIRE_HEADER_ABBR, 188 /* [5.6.1.2] */ TABLE_MAY_REQUIRE_HEADER_ABBR_NULL, 189 /* [5.6.1.3] */ TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES, 190 /* [6.1.1.1] */ STYLESHEETS_REQUIRE_TESTING_LINK, 191 /* [6.1.1.2] */ STYLESHEETS_REQUIRE_TESTING_STYLE_ELEMENT, 192 /* [6.1.1.3] */ STYLESHEETS_REQUIRE_TESTING_STYLE_ATTR, 193 /* [6.2.1.1] */ FRAME_SRC_INVALID, 194 /* [6.2.2.1] */ TEXT_EQUIVALENTS_REQUIRE_UPDATING_APPLET, 195 /* [6.2.2.2] */ TEXT_EQUIVALENTS_REQUIRE_UPDATING_SCRIPT, 196 /* [6.2.2.3] */ TEXT_EQUIVALENTS_REQUIRE_UPDATING_OBJECT, 197 /* [6.3.1.1] */ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_SCRIPT, 198 /* [6.3.1.2] */ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_OBJECT, 199 /* [6.3.1.3] */ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_EMBED, 200 /* [6.3.1.4] */ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_APPLET, 201 /* [6.5.1.1] */ FRAME_MISSING_NOFRAMES, 202 /* [6.5.1.2] */ NOFRAMES_INVALID_NO_VALUE, 203 /* [6.5.1.3] */ NOFRAMES_INVALID_CONTENT, 204 /* [6.5.1.4] */ NOFRAMES_INVALID_LINK, 205 /* [7.1.1.1] */ REMOVE_FLICKER_SCRIPT, 206 /* [7.1.1.2] */ REMOVE_FLICKER_OBJECT, 207 /* [7.1.1.3] */ REMOVE_FLICKER_EMBED, 208 /* [7.1.1.4] */ REMOVE_FLICKER_APPLET, 209 /* [7.1.1.5] */ REMOVE_FLICKER_ANIMATED_GIF, 210 /* [7.2.1.1] */ REMOVE_BLINK_MARQUEE, 211 /* [7.4.1.1] */ REMOVE_AUTO_REFRESH, 212 /* [7.5.1.1] */ REMOVE_AUTO_REDIRECT, 213 /* [8.1.1.1] */ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_SCRIPT, 214 /* [8.1.1.2] */ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_OBJECT, 215 /* [8.1.1.3] */ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_APPLET, 216 /* [8.1.1.4] */ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_EMBED, 217 /* [9.1.1.1] */ IMAGE_MAP_SERVER_SIDE_REQUIRES_CONVERSION, 218 /* [9.3.1.1] */ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_DOWN, 219 /* [9.3.1.2] */ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_UP, 220 /* [9.3.1.3] */ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_CLICK, 221 /* [9.3.1.4] */ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OVER, 222 /* [9.3.1.5] */ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OUT, 223 /* [9.3.1.6] */ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_MOVE, 224 /* [10.1.1.1] */ NEW_WINDOWS_REQUIRE_WARNING_NEW, 225 /* [10.1.1.2] */ NEW_WINDOWS_REQUIRE_WARNING_BLANK, 226 /* [10.2.1.1] */ LABEL_NEEDS_REPOSITIONING_BEFORE_INPUT, 227 /* [10.2.1.2] */ LABEL_NEEDS_REPOSITIONING_AFTER_INPUT, 228 /* [10.4.1.1] */ FORM_CONTROL_REQUIRES_DEFAULT_TEXT, 229 /* [10.4.1.2] */ FORM_CONTROL_DEFAULT_TEXT_INVALID_NULL, 230 /* [10.4.1.3] */ FORM_CONTROL_DEFAULT_TEXT_INVALID_SPACES, 231 /* [11.2.1.1] */ REPLACE_DEPRECATED_HTML_APPLET, 232 /* [11.2.1.2] */ REPLACE_DEPRECATED_HTML_BASEFONT, 233 /* [11.2.1.3] */ REPLACE_DEPRECATED_HTML_CENTER, 234 /* [11.2.1.4] */ REPLACE_DEPRECATED_HTML_DIR, 235 /* [11.2.1.5] */ REPLACE_DEPRECATED_HTML_FONT, 236 /* [11.2.1.6] */ REPLACE_DEPRECATED_HTML_ISINDEX, 237 /* [11.2.1.7] */ REPLACE_DEPRECATED_HTML_MENU, 238 /* [11.2.1.8] */ REPLACE_DEPRECATED_HTML_S, 239 /* [11.2.1.9] */ REPLACE_DEPRECATED_HTML_STRIKE, 240 /* [11.2.1.10] */ REPLACE_DEPRECATED_HTML_U, 241 /* [12.1.1.1] */ FRAME_MISSING_TITLE, 242 /* [12.1.1.2] */ FRAME_TITLE_INVALID_NULL, 243 /* [12.1.1.3] */ FRAME_TITLE_INVALID_SPACES, 244 /* [12.4.1.1] */ ASSOCIATE_LABELS_EXPLICITLY, 245 /* [12.4.1.2] */ ASSOCIATE_LABELS_EXPLICITLY_FOR, 246 /* [12.4.1.3] */ ASSOCIATE_LABELS_EXPLICITLY_ID, 247 /* [13.1.1.1] */ LINK_TEXT_NOT_MEANINGFUL, 248 /* [13.1.1.2] */ LINK_TEXT_MISSING, 249 /* [13.1.1.3] */ LINK_TEXT_TOO_LONG, 250 /* [13.1.1.4] */ LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE, 251 /* [13.1.1.5] */ LINK_TEXT_NOT_MEANINGFUL_MORE, 252 /* [13.1.1.6] */ LINK_TEXT_NOT_MEANINGFUL_FOLLOW_THIS, 253 /* [13.2.1.1] */ METADATA_MISSING, 254 /* [13.2.1.2] */ METADATA_MISSING_LINK, 255 /* [13.2.1.3] */ METADATA_MISSING_REDIRECT_AUTOREFRESH, 256 /* [13.10.1.1] */ SKIPOVER_ASCII_ART, 257 258 LAST_ACCESS_ERR /* must be last */ 259 }; 260 261 262 void AccessibilityHelloMessage( TidyDocImpl* doc ); 263 void DisplayHTMLTableAlgorithm( TidyDocImpl* doc ); 264 265 /************************************************************ 266 * AccessibilityChecks 267 * 268 * Traverses through the individual nodes of the tree 269 * and checks attributes and elements for accessibility. 270 * after the tree structure has been formed. 271 ************************************************************/ 272 273 void AccessibilityChecks( TidyDocImpl* doc ); 274 275 276 #endif /* SUPPORT_ACCESSIBILITY_CHECKS */ 277 #endif /* __ACCESS_H__ */ 278

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.