![]() | ![]() | ![]() |
In SAS 9.1 and later releases, all of the accessibility enhancements have been merged into the ODS HTML tagsets. No additional steps are required.
In releases prior to SAS 9, you can use a customized accessibility tagset with the ODS MARKUP statement to implement Section 508 requirements and produce more accessible HTML pages. The ODS accessibility tagset code (shown below) references the 1194.22 technical standards that are outlined in the Web-based Intranet and Internet Information and Applications guidelines. Review these guidelines to understand how the accessibility tagset relates to the 508 requirements.
This tech tip contains:
http://www.sas.com/govedu/accessibility.html
Do not rely exclusively on color to convey information or indicate an action. If the software conveys information by color alone, users who cannot identify or distinguish colors will not be able to use the information.
The only information conveyed with color that is not also conveyed without color, is traffic lighting. Users control the use of color to convey traffic lighting. If color is used, you can convey the meaning of the traffic lighting using the STYLE option with the FLYOVER attribute to assign a descriptive string to your table or to individual table cells.
Use markup to identify headings for rows and columns in data tables.
For Release 8.2 this can be addressed by creating the accessibility tagset and then using the ODS MARKUP statement to apply accessibility tags to a file.
Use markup to associate data cells with header cells when the data table has two or more logical levels of row or column headers.
For Release 8.2 summary="Page Layout" will be added to layout tables when the accessibility tagset is applied. Appropriate tags for row and column headers, such as <th> </th> for table header, are applied to the table. As shown in tagsets.accessibility, the HEADER or ROWHEADER event will be invoked from the DATA event if the section is "head" or "rowheader."
When pages utilize scripting languages to display content or to create interface elements, the information provided by the script shall be identified with functional text that can be read by assistive technology.
For Release 8.2, the accessibility tagset provides this functionality by adding <NOSCRIPT> </NOSCRIPT> tags to your HTML file. You can modify the tagsets.accessibility source to add your own text string between the NOSCRIPT tags when you are using JavaScript.
/*----------------------------------------------------------
* Tagset Name: Accessibility
* Title : Implements 508 requirements so ODS can
* : produce more accessible HTML pages
* Support : ODS Development Team
*----------------------------------------------------------*/
/*----------------------------------------------------------
* See http://www.sas.com/rnd/base/index-early-access.html
* for more detailed information on creating/modifying
* tagsets
*----------------------------------------------------------*/
/*----------------------------------------------------------
* Lines tagged as New were added to each event to
* meet the 508 requirements for accessibility
*----------------------------------------------------------*/
proc template;
define tagset tagsets.accessibility;
parent=tagsets.htmlcss;
/* Web Accessibility Feature 1194.22 (h) */
/*-----------------------------------------------------*/
define event association;
put '<table summary="Page Layout">'; /* New */
put "<tr>" CR;
finish:
put "</tr>" CR;
put "</table>" CR;
end;
/* Web Accessibility Feature 1194.22 (g & h) */
/*----------------------------------------------------------*/
define event data;
start:
trigger header /if cmp(section, "head"); /* New */
break /if cmp(section, "head"); /* New */
trigger header /if cmp(htmlclass, "rowheader"); /* New */
break /if cmp(htmlclass, "rowheader"); /* New */
trigger header /if cmp(htmlclass, "header"); /* New */
break /if cmp(htmlclass, "header"); /* New */
put "<td";
trigger pre_post;
putq " class=" HTMLCLASS;
putq " title=" flyover;
trigger align;
trigger style_inline;
trigger rowcol;
put ">";
put '<pre>' /if exists(asis);
put VALUE CR;
finish:
trigger header /if cmp(section, "head"); /* New */
break /if cmp(section, "head"); /* New */
trigger header /if cmp(htmlclass, "rowheader"); /* New */
break /if cmp(htmlclass, "rowheader"); /* New */
trigger header /if cmp(htmlclass, "header"); /* New */
break /if cmp(htmlclass, "header"); /* New */
trigger pre_post;
put '</pre>' /if exists(asis);
put "</td>" CR;
end;
/* Web Accessibility Feature 1194.22 (I) */
/*-----------------------------------------*/
define event doc_body;
put '<body onload="startup()"';
put ' onunload="shutdown()"';
put ' bgproperties="Fixed"' / exists(WATERMARK);
putq " class=" HTMLCLASS;
putq " background=" BACKGROUNDIMAGE;
trigger style_inline;
put ">" CR;
trigger pre_post;
put '<SCRIPT LANGUAGE="JavaScript">' CR;
put "<!-- " CR;
put "// This script is to load all object onLoad() functions " CR;
put "function startup(){}" CR;
put "function shutdown(){}" CR;
put " " CR;
put "//-->" CR;
put "</SCRIPT>" CR;
put '<NOSCRIPT></NOSCRIPT>' CR; /* New */
put CR;
finish:
trigger pre_post;
put "</body>" CR;
end;
/* Web Accessibility Feature 1194.22 (I) */
/*-----------------------------------------------------*/
define event javascript;
start:
put '<SCRIPT LANGUAGE="JavaScript">' CR;
put "<!-- " CR;
put "// This script is to load all object onLoad() functions " CR;
finish:
put CR "//-->" CR;
put "</SCRIPT>" CR CR;
put '<NOSCRIPT></NOSCRIPT>' CR; /* New */
end;
/* Web Accessibility Feature 1194.22 (g&h) */
/*---------------------------------------------------------*/
define event rowcol;
putq ' rowspan=' ROWSPAN;
putq ' colspan=' COLSPAN;
trigger rowhead / if cmp(HTMLCLASS,"RowHeader"); /* New */
trigger colhead / if cmp(HTMLCLASS,"Header"); /* New */
end;
/* Web Accessibility Feature 1194.22 (g&h) */
/*--------------------------------------------------------*/
define event rowhead; /* New */
put ' scope=rowgroup' /if exists(ROWSPAN);
put ' scope=row' /if !exists(ROWSPAN);
end;
/* Web Accessibility Feature 1194.22 (g&h) */
/*--------------------------------------------------------*/
define event colhead; /* New Event */
put ' scope=colgroup' /if exists(COLSPAN);
put ' scope=col' /if !exists(COLSPAN);
end;
/* Web Accessibility Feature 1194.2 (h) */
/*---------------------------------------------------*/
define event table;
start:
put "<div" CR;
trigger align;
put ">" CR;
trigger pre_post;
put "<table";
putq " class=" HTMLCLASS;
trigger style_inline;
putq " border=" BORDERWIDTH;
put ' border="1"' / if !exists(BORDERWIDTH);
putq " cellspacing=" CELLSPACING;
putq " cellpadding=" CELLPADDING;
putq " rules=" RULES;
putq " frame=" FRAME;
put ' summary="Page Layout"' /if cmp(htmlclass, "batch"); /* New */
put ">" CR;
finish:
put "</table>" CR;
trigger pre_post;
put "</div>" CR;
put "<br>" CR;
end;
define event top_code;
start:
put "<frameset frameborder=";
put "YES" / if !exists(FRAMEBORDER);
put FRAMEBORDER;
put " framespacing=";
put '"3"' / if !exists(FRAMESPACING);
putq FRAMESPACING;
/* not horizontal */
put ' cols="' / if cmp(colcount, "2");
/* horizontal */
put ' rows="' / if cmp(colcount, "1");
/* content_frameset if content_first */
trigger content_frameset / if cmp(type, "f");
/* body_frameset if not content_first */
trigger body_frameset / if cmp(type,"l");
put ',';
/* body_frameset if content_first */
trigger body_frameset / if cmp(type, "f");
/* content_frameset if not content_first */
trigger content_frameset / if cmp(type, "l");
put '">' CR;
finish:
put "</frameset>" nl;
put "<noframes>" nl;
put "</noframes>" nl;
end;
end;
run;
|
/* Proc Tabulate example applying tagsets.accessibility: */
ods markup tagset=tagsets.accessibility /* pointing to tagsets.accessibility */
file='C:\html\AccessibleTabulate.html' /* new html to be created */
style=sasweb
stylesheet=(url="sasweb.css");
title 'Proc TABULATE With tagsets.accessibility Applied';
proc tabulate data=sashelp.class;
class age sex;
var Height Weight;
table (sex all)*(age all), (Height Weight) * (Min Mean Max);
run;
ods markup close;
|
| Product Family | Product | System | SAS Release | |
| Reported | Fixed* | |||
| SAS System | Base SAS | All | n/a | |
| Type: | Usage Note |
| Priority: | low |
| Topic: | SAS Reference ==> ODS (Output Delivery System) Third Party ==> Output ==> HTML |
| Date Modified: | 2007-09-27 15:10:53 |
| Date Created: | 2005-07-18 13:48:31 |



