Class 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
    • Constructor Detail

      • ScreenReaderSection

        public ScreenReaderSection()
    • Method Detail

      • getAfterChartFormat

        public String getAfterChartFormat()
        Returns the format for the screen reader information region after the chart. Analogous to beforeChartFormat.

        Default: "{endOfChartMarker}"

      • setAfterChartFormat

        public void setAfterChartFormat​(String afterChartFormat)
        Sets the format for the screen reader information region after the chart. Analogous to beforeChartFormat.

        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 to beforeChartFormatter.

        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 to beforeChartFormatter.

        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 on setBeforeChartFormat(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.