Section 10: Accessibility Mode (Section 508 Compliance)

NetCharts Server contains features that allow it to be used in U.S. Government sponsored applications that are required to provide web pages that are accessible to people with disabilities. The details of this Federal IT Accessibility Initiative can be found at http://www.section508.gov.

The NetCharts Server programming toolkits contain methods that activate accessibility mode. In this mode, HTML pages, chart images and chart image maps generated by NetCharts Server are formatted to be processed by non graphical web browsers. Custom ALT and TITLE attributes are generated for html IMG and AREA tags that can be configured to contain detailed information about the chart in a textual format.

For example, consider the following example pie chart. This chart shows the results of a company placing banner advertisements on several web sites. The slices show how many banner ad “clickthroughs” occurred on ads on a particular website on a particular day. Mouse clicking on the slice would bring up another browser window targeted at that website.
 
dev
 
Accessibility Mode Parameters

The following three parameters are used in the NetCharts Server’s programming toolkits to control accessibility mode.

AccessibilityMode

AccessibilityMode is a boolean value used to turn accessibility mode on or off. The default value in all toolkits is false.

AltTextTemplate

AltTextTemplate is a template that defines the text to be used in html image map AREA tags for the ALT and TITLE attributes. The template can optionally contain the following variables that NetCharts Server will replace at runtime.

ASP/ColdFusion Toolkit variable name Java/JSP Toolkit variable name Variable definition
@label@ LABEL_REPLACE The value of the data point represented by this area tag
@index@ INDEX_REPLACE The index of the data point represented by this area tag
@param@ PARAM_REPLACE The name of the chart element represented by this area tag
@href@ HREF_REPLACE The URL that will be visited when mouse is clicked on this area tag
@target@ TARGET_REPLACE The window that will receive the drilldown href.

 

For the java toolkit, these variables are stored as static strings in the netcharts.server.util.Imagewriter
class, as shown in the example code below.

ChartDescription

ChartDescription is used as the value for the ALT and TITLE attributes on the chart image tag. If unspecified, the ALT and TITLE attributes will be generated from the data in the chart template’s MetaData attribute named Description. If there is no MetaData attribute named Description defined, simple text for the ALT and TITLE attributes will be auto-generated by NetCharts Server.
 
Integrating Accessibility Mode Integrate Using Java/JSP

In the Java/JSP toolkit, the accessibility mode parameters are specified within methods defined on the NSToolkit class. The following .jsp page includes code that generates the pie charts shown in the figures above.

<%@ page import=”java.util.*” %>
<%@ page import=”netcharts.server.api.*” %>
<%@ page import=”netcharts.server.util.*” %>
 
<%
Hashtable variables = new Hashtable();
variables.put(“CLICKDATA”,”95,122,240″);
NSWebToolKit toolKit = new NSWebToolKit(“Examples/ToolkitExamples”);
toolKit.setAccessibilityMode(true);
toolKit.setAMChartDescription(“Piechart showing Banner add click-though data”);
toolKit.setAMActiveLabelTextTemplate(“Pie slice ” + ImageMapCreator.INDEX_REPLACE +
” has a value of ” + ImageMapCreator.LABEL_REPLACE + “, clicking it will bring up ” +
ImageMapCreator.HREF_REPLACE + ” in the window ” + ImageMapCreator.TARGET_REPLACE);
%>
<HTML>
<BODY>
<%=toolKit.getChartAsImageAndMap(“bannerads.cdx”,variables,request,false) %>
</BODY>
</HTML>

Integrate Using ASP

In the ASP toolkit, the accessibility mode parameters are specified in the toolkit object. The following .asp page includes code that generates the pie charts shown in the figures above.

<%
Dim toolKit, myHashTable
Set toolKit = Server.CreateObject(“NetChartsServer.NSToolKit”)
Set myHashTable = Server.CreateObject(“NetChartsServer.Hashtable”)
toolKit.setProject “Examples/ToolkitExamples”
 
myHashTable.putValue “CLICKDATA”,”95,122,240″
toolKit.setAccessibilityMode True
toolKit.setAMActiveLabelTextTemplate “Pie slice @index@ has a value of @label@,
clicking it will bring up @href@ in the window @target@”
toolKit.setAMChartDescription “Piechart showing Banner add click-though data”
%>
<HTML>
<BODY>
<%=toolKit.getChartAsImageAndMap(“bannerads.cdx”,myHashTable) %>
<% Set toolKit = Nothing %>
</BODY>
</HTML>

Integrate Using .NET

In the .NET toolkit, the accessibility mode parameters are specified in the toolkit object. The following VB.NET code generates the pie charts shown in the figures above.

Dim toolKit as NetChartsServer.NSWebToolKit = new   NetChartsServer.NSWebToolKit(Examples/ToolkitExamples”)
Dim hashTable as Hashtable = new Hashtable
 
myHashTable.Add(“CLICKDATA”,”95,122,240″)
 
toolKit.AccessibilityMode(True)
toolKit.AMActiveLabelTextTemplate(“Pie slice @index@ has a value of @label@,
clicking it will bring up @href@ in the window @target@”)
toolKit.AMChartDescription(“Piechart showing Banner add click-though data”)
 
Try
theChart.Text = toolkit.getChartAsImageAndMap(“bannerads.cdx”, hashTable, “”, False, Request.ApplicationPath & “/getncsimage.aspx”)
Catch nce As NetChartsServer.NSToolKitException
theChart.Text = nce.Message
End Try
 
clientScript.Text = toolkit.getRolloverJavaScript