Class ScreenReaderSection
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.ScreenReaderSection
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class ScreenReaderSection extends Optionable
Accessibility options for the screen reader information sections added before and after the chart.- Since:
- 10.2.1.0
- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description ScreenReaderSection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAfterChartFormat()
Returns the format for the screen reader information region after the chart.org.zkoss.json.JavaScriptValue
getAfterChartFormatter()
Returns a formatter function to create the HTML contents of the hidden screen reader information region after the chart.String
getAxisRangeDateFormat()
Returns the date format to use to describe range of datetime axes.String
getBeforeChartFormat()
Returns the format for the screen reader information region before the chart.org.zkoss.json.JavaScriptValue
getBeforeChartFormatter()
Sets a formatter function to create the HTML contents of the hidden screen reader information region before the chart.org.zkoss.json.JavaScriptValue
getOnPlayAsSoundClick()
Returns the function to run upon clicking the "Play as sound" button in the screen reader region.org.zkoss.json.JavaScriptValue
getOnViewDataTableClick()
Returns the function to run upon clicking the "View as Data Table" link in the screen reader region.void
setAfterChartFormat(String afterChartFormat)
Sets the format for the screen reader information region after the chart.void
setAfterChartFormatter(org.zkoss.json.JavaScriptValue afterChartFormatter)
Sets a formatter function to create the HTML contents of the hidden screen reader information region after the chart.void
setAxisRangeDateFormat(String axisRangeDateFormat)
Sets the date format to use to describe range of datetime axes.void
setBeforeChartFormat(String beforeChartFormat)
Sets the format for the screen reader information region before the chart.void
setBeforeChartFormatter(org.zkoss.json.JavaScriptValue beforeChartFormatter)
Sets a formatter function to create the HTML contents of the hidden screen reader information region before the chart.void
setOnPlayAsSoundClick(org.zkoss.json.JavaScriptValue onPlayAsSoundClick)
Sets the function to run upon clicking the "Play as sound" button in the screen reader region.void
setOnViewDataTableClick(org.zkoss.json.JavaScriptValue onViewDataTableClick)
Sets the function to run upon clicking the "View as Data Table" link in the screen reader region.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
-
-
-
Method Detail
-
getAfterChartFormat
public String getAfterChartFormat()
Returns the format for the screen reader information region after the chart. Analogous tobeforeChartFormat
.Default:
"{endOfChartMarker}"
-
setAfterChartFormat
public void setAfterChartFormat(String afterChartFormat)
Sets the format for the screen reader information region after the chart. Analogous tobeforeChartFormat
.Default:
"{endOfChartMarker}"
-
getAfterChartFormatter
public org.zkoss.json.JavaScriptValue getAfterChartFormatter()
Returns a formatter function to create the HTML contents of the hidden screen reader information region after the chart. Analogous tobeforeChartFormatter
.Default:
null
.
-
setAfterChartFormatter
public void setAfterChartFormatter(org.zkoss.json.JavaScriptValue afterChartFormatter)
Sets a formatter function to create the HTML contents of the hidden screen reader information region after the chart. Analogous tobeforeChartFormatter
.Default:
null
.
-
getAxisRangeDateFormat
public String getAxisRangeDateFormat()
Returns the date format to use to describe range of datetime axes.Default:
"%Y-%m-%d %H:%M:%S"
.
-
setAxisRangeDateFormat
public void setAxisRangeDateFormat(String axisRangeDateFormat)
Sets the date format to use to describe range of datetime axes.Default:
"%Y-%m-%d %H:%M:%S"
.- See Also:
AccessibilityPoint.setDateFormat(String)
-
getBeforeChartFormat
public String getBeforeChartFormat()
Returns the format for the screen reader information region before the chart.Default:
"<{headingTagName}>{chartTitle}</{headingTagName}><div>{typeDescription}</div><div>{chartSubtitle}</div><div>{chartLongdesc}</div><div>{playAsSoundButton}</div><div>{viewTableButton}</div><div>{xAxisDescription}</div><div>{yAxisDescription}</div><div>{annotationsTitle}{annotationsList}</div>"
-
setBeforeChartFormat
public void setBeforeChartFormat(String beforeChartFormat)
Sets the format for the screen reader information region before the chart. Supported HTML tags are<h1-6>
,<p>
,<div>
,<a>
,<ul>
,<ol>
,<li>
, and<button>
. Attributes are not supported, except for id on<div>
,<a>
, and<button>
. Id is required on<a>
and<button>
in the format<tag id="abcd">
. Numbers, lower- and uppercase letters, "-" and "#" are valid characters in IDs.The headingTagName is an auto-detected heading (h1-h6) that corresponds to the heading level below the previous heading in the DOM.
Set to empty string to remove the region altogether.
-
getBeforeChartFormatter
public org.zkoss.json.JavaScriptValue getBeforeChartFormatter()
Sets a formatter function to create the HTML contents of the hidden screen reader information region before the chart.Default:
null
-
setBeforeChartFormatter
public void setBeforeChartFormatter(org.zkoss.json.JavaScriptValue beforeChartFormatter)
Sets a formatter function to create the HTML contents of the hidden screen reader information region before the chart. Receives one argument,chart
, referring to the chart object. Should return a string with the HTML content of the region. By default this returns an automatic description of the chart based onsetBeforeChartFormat(String)
.
-
getOnPlayAsSoundClick
public org.zkoss.json.JavaScriptValue getOnPlayAsSoundClick()
Returns the function to run upon clicking the "Play as sound" button in the screen reader region.Default:
null
-
setOnPlayAsSoundClick
public void setOnPlayAsSoundClick(org.zkoss.json.JavaScriptValue onPlayAsSoundClick)
Sets the function to run upon clicking the "Play as sound" button in the screen reader region.By default Highcharts will call the
chart.sonify
function.
-
getOnViewDataTableClick
public org.zkoss.json.JavaScriptValue getOnViewDataTableClick()
Returns the function to run upon clicking the "View as Data Table" link in the screen reader region.Default:
null
-
setOnViewDataTableClick
public void setOnViewDataTableClick(org.zkoss.json.JavaScriptValue onViewDataTableClick)
Sets the function to run upon clicking the "View as Data Table" link in the screen reader region.By default Highcharts will insert and set focus to a data table representation of the chart.
-
-