Let’s look at the term “accessible” and how it relates to the SAS world. Accessible output is output that can be read by a screen reader to someone with low or no vision, visualized by someone with low vision or color blindness, or navigated by someone with limited mobility. In January of 2017, the United States Access Board published a final rule that documents federal standards and guidelines for accessibility compliance specific to information and communication technology (ICT). The new standards and guidelines update the Section 508 law that was most recently amended in 1998, and adopt many of the Web Content Accessibility Guidelines (WCAG) 2.0 standards. Here’s a comparison document: Comparison Table of WCAG 2.0 to Existing 508 Standards. The final rule (as a parent, I appreciate this rule name!) is also known as the “508 refresh”.
To help SAS US customers comply with the visual-accessibility regulations outlined by the final rule, ODS developers are providing SAS programmers with the ability to create accessible results to present their SAS data. In SAS® 9.4 TS1M4 (9.4M4), there are three great improvements that I would like to highlight:
- ACCESSIBLE_GRAPH option (preproduction) in the ODS HTML5 statement
- SAS® Graphics Accelerator
- ACCESSIBLE option (preproduction) in the ODS PDF statement
Note about “Preproduction” Status: ACCESSIBLE and ACCESSIBLE_GRAPH
Why are the ACCESSIBLE (in the ODS PDF FILE= statement) and ACCESSIBLE_GRAPH (in the ODS HTML5 FILE=statement) options preproduction? By setting the status as preproduction, the development team has greater flexibility to make changes to the syntax and underlying architecture. The development team has worked hard to provide these new features, and is very eager to hear feedback from the SAS programming community. They also encourage feedback from the compliance teams that work for those of you who are striving to make your SAS results accessible. Please request and install SAS 9.4M4 here, and start using these new features to generate your current results in the new formats. Ask your compliance team to assess the output, and let us know (accessibility@sas.com) how close we are to making your files compliant with the final rule.
ODS HTML5
The ODS HTML5 destination, which was introduced in SAS® 9.4, creates the most accessible output in SAS for consumption of tables and graphs on the web. This destination creates SVG graphs from ODS GRAPHICS results. SVG graphics scale when zoomed, which maintains the visual integrity of the image. To ensure that the results comply with the maximum number of WCAG standards, use one of the following styles:
- DAISY (recommended)
- VADARK
- HIGHCONTRAST
- JOURNAL2
In most cases, these styles provide a high level of contrast in graphics output and tabular output.[1]
When you use an accessibility checker such as the open-source accessibility testing tool aXe, you can see how the HTML5 destination compares to the HTML4 destination (the default destination in SAS® Foundation). Here is a comparison of a simple PRINT procedure step. Using this code, I generate two HTML files, html4.html and html5.html:
ods html file="html4.html" path="c:\temp" ; ods html5 file="html5.html" path="c:\temp" style=daisy; proc print data=sashelp.cars(obs=5); var type origin; run; ods _all_ close; |
An aXe analysis in Mozilla Firefox finds the following violations in the html4.html file:
Here is the analysis of the html5.html file:
Your success might vary with more complex procedures. The final paragraph of the blog post describes how to offer feedback after you test your code in the HTML5 destination using SAS 9.4M4.
SAS® Graphics Accelerator
The addition of the ACCESSIBLE_GRAPH preproduction option to the ODS HTML5 statement adds accessibility metadata (tags) around ODS GRAPHICS images routed to the HTML5 destination[2]. This metadata provides the ability to have bar charts, time series plots, heat maps, line charts, scatter plots, and histograms consumed by an exciting new add-in available for the Google Chrome and (coming soon) Firefox browsers: SAS GRAPHICS Accelerator. SAS Graphics Accelerator provides the following capabilities:
- The interactive exploration of supported graphics using sound
- The ability to download data in tabular format to a CSV file
- Customization of visual and auditory settings for alternative presentations
Pay attention to the SAS Graphics Accelerator web page because improvements and features are being offered on a regular basis!
ODS PDF ACCESSIBLE
The web is “where it’s at” for most consumers of your organization’s information. However, many sites need PDF files for results requiring a longer storage time. Prior to SAS 9.4M4, using a screen reader with PDF files created by ODS did not work because the PDF files created by ODS are not “tagged.” Tags in a PDF file are not visible in Adobe Reader when the file is opened. But, when a PDF file is tagged, the file contains underlying metadata to facilitate screen readers verbalizing the results. Here’s an example of the same PROC PRINT step above written to two different PDF files using SAS 9.4M4. I created the tagged.pdf file using the ACCESSIBLE preproduction destination option, so the file includes tags, making it accessible using assistive technology.
ods pdf file="c:\temp\untagged_default.pdf"; ods pdf (id=a) file="c:\temp\tagged.pdf" accessible; proc print data=sashelp.cars(obs=5); var type origin; run; ods _all_ close; |
To determine whether a PDF file is tagged, you can do the following from Adobe Reader:
Open the file and select File ► Properties ► Description. In the Advanced paragraph you will see: Tagged PDF: Yes. To see the tags from Adobe Acrobat Pro, open the file and select View ► Show/Hide ► Navigation Panes ► Tags. I checked the untagged_default.pdf file and saw the following, which means that this file is not useful to a screen reader:
Let’s compare the results from the tagged.pdf file:
A screen reader uses the HTML-like markup shown above to verbalize the file to someone with low or no vision.
Adobe Acrobat Pro has built-in accessibility checkers that enable us to examine the degree of accessibility of our files. You can display this setting by selecting View ► Tools ► Accessibility. A full discussion of the Adobe compliance-check features is outside the scope of this article. But, an initial examination of the tagged.pdf file shows that there are many accessible features included in the file, and that two of the features need a manual check:
Check with staff who are well-versed in compliance at your organization, and let us know if our files meet your standards.
I want to see sample code, and hear more! How do I get access to SAS 9.4M4 and more information about these new features?
Your SAS installation representative can order SAS 9.4M4 using the information on this page, Request a Maintenance Release.
Read these upcoming papers (available in April 2017) for code samples. And, if you are attending SAS Global Forum 2017, plan to attend the following presentations:
- A Guru’s Guide: Producing Section 508-Compliant Custom Reports with the Output Delivery System by Daniel O’Connor
- Tag, You’re It! Creating Accessible (Tagged) PDF Files with SAS® 9.4 Output Delivery System by Glen Walker
- Raising the Bar: The Pending Section 508 Refresh and the ODS HTML5 Destination by Glen Walker
Here are links to the documentation and a previously published SAS Global Forum paper on the topic:
- Creating Accessible SAS® 9.4 Output Using ODS and ODS Graphics
- A Guide to Section 508 Compliance Using SAS® 9.4 Output Delivery System (ODS)
How did we do?
We welcome feedback regarding the results that you are generating with SAS 9.4M4, and look forward to offering the ODS statement options in production status with improved features and support for more procedures. Please send feedback to accessibility@sas.com.
[1] See “Use an ODS Style to Create Accessible Output” in Creating Accessible SAS 9.4 Output Using ODS and ODS Graphics for more information.
[2] See “ODS HTML5 Statement Options Related to Accessibility” in Creating Accessible SAS 9.4 Output Using ODS and ODS Graphics for more information