Class LangAccessibility
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.LangAccessibility
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class LangAccessibility extends Optionable
Configure the accessibility strings in the chart.Requires the accessibility module to be loaded. For example,
Library.setProperty("org.zkoss.chart.modules.accessibility", "true");
For more dynamic control over the accessibility functionality, see
AccessibilityPoint.getDescriptionFormatter()
,AccessibilitySeries.getDescriptionFormatter()
, andScreenReaderSection.getBeforeChartFormatter()
.- 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 LangAccessibility()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LangAnnounceNewData
getAnnounceNewData()
Returns default announcement for new data in charts.LangAxis
getAxis()
Returns axis description format strings.String
getChartContainerLabel()
Default:"{title}. Highcharts interactive chart."
LangChartTypes
getChartTypes()
Returns Chart type description strings.String
getCredits()
Default:"Chart credits: {creditsStr}"
String
getDefaultChartTitle()
Default:"Chart"
String
getDrillUpButton()
Default:"{buttonText}"
LangExporting
getExporting()
Returns exporting menu format strings for accessibility module.String
getGraphicContainerLabel()
Returns a label on the container wrapping the SVG.LangLegend
getLegend()
Returns language options for accessibility of the legend.LangRangeSelector
getRangeSelector()
Returns range selector language options for accessibility.LangScreenReaderSection
getScreenReaderSection()
Returns language options for the screen reader information sections added before and after the charts.LangSeries
getSeries()
Returns lang configuration for different series types.LangSeriesTypeDescriptions
getSeriesTypeDescriptions()
Returns the descriptions of lesser known series types.LangSonification
getSonification()
Returns language options for sonification.String
getSvgContainerLabel()
Default:"Interactive chart"
String
getSvgContainerTitle()
Returns the title element text for the chart SVG element.LangTable
getTable()
Returns accessibility language options for the data table.String
getThousandsSep()
Returns thousands separator to use when formatting numbers for screen readers.LangZoom
getZoom()
Returns chart and map zoom accessibility language options.void
setAnnounceNewData(LangAnnounceNewData announceNewData)
Sets default announcement for new data in charts.void
setAxis(LangAxis axis)
Sets axis description format strings.void
setChartContainerLabel(String chartContainerLabel)
void
setChartTypes(LangChartTypes chartTypes)
Sets Chart type description strings.void
setCredits(String credits)
void
setDefaultChartTitle(String defaultChartTitle)
void
setDrillUpButton(String drillUpButton)
void
setExporting(LangExporting exporting)
Sets exporting menu format strings for accessibility module.void
setGraphicContainerLabel(String graphicContainerLabel)
Sets a label on the container wrapping the SVG.void
setLegend(LangLegend legend)
Sets language options for accessibility of the legend.void
setRangeSelector(LangRangeSelector rangeSelector)
Sets range selector language options for accessibility.void
setScreenReaderSection(LangScreenReaderSection screenReaderSection)
Sets language options for the screen reader information sections added before and after the charts.void
setSeries(LangSeries series)
Sets lang configuration for different series types.void
setSeriesTypeDescriptions(LangSeriesTypeDescriptions seriesTypeDescriptions)
Sets descriptions of lesser known series types.void
setSonification(LangSonification sonification)
Sets language options for sonification.void
setSvgContainerLabel(String svgContainerLabel)
void
setSvgContainerTitle(String svgContainerTitle)
Sets the title element text for the chart SVG element.void
setTable(LangTable table)
Sets accessibility language options for the data table.void
setThousandsSep(String thousandsSep)
Sets thousands separator to use when formatting numbers for screen readers.void
setZoom(LangZoom zoom)
Sets chart and map zoom accessibility language options.-
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
-
getAnnounceNewData
public LangAnnounceNewData getAnnounceNewData()
Returns default announcement for new data in charts. If null, create a new one.Default: an instance of
LangAnnounceNewData
-
setAnnounceNewData
public void setAnnounceNewData(LangAnnounceNewData announceNewData)
Sets default announcement for new data in charts.
-
getAxis
public LangAxis getAxis()
Returns axis description format strings. If null, create a new one.
-
setAxis
public void setAxis(LangAxis axis)
Sets axis description format strings.- Parameters:
axis
-
-
getChartContainerLabel
public String getChartContainerLabel()
Default:
"{title}. Highcharts interactive chart."
-
setChartContainerLabel
public void setChartContainerLabel(String chartContainerLabel)
-
getChartTypes
public LangChartTypes getChartTypes()
Returns Chart type description strings. This is added to the chart information region. If null, create a new one.
-
setChartTypes
public void setChartTypes(LangChartTypes chartTypes)
Sets Chart type description strings. This is added to the chart information region.If there is only a single series type used in the chart, we use the format string for the series type, or default if missing. There is one format string for cases where there is only a single series in the chart, and one for multiple series of the same type.
-
getCredits
public String getCredits()
Default:
"Chart credits: {creditsStr}"
-
setCredits
public void setCredits(String credits)
-
getDefaultChartTitle
public String getDefaultChartTitle()
Default:
"Chart"
-
setDefaultChartTitle
public void setDefaultChartTitle(String defaultChartTitle)
-
getDrillUpButton
public String getDrillUpButton()
Default:
"{buttonText}"
-
setDrillUpButton
public void setDrillUpButton(String drillUpButton)
-
getExporting
public LangExporting getExporting()
Returns exporting menu format strings for accessibility module. If null, create a new one.
-
setExporting
public void setExporting(LangExporting exporting)
Sets exporting menu format strings for accessibility module.
-
getGraphicContainerLabel
public String getGraphicContainerLabel()
Returns a label on the container wrapping the SVG.Default:
""
-
setGraphicContainerLabel
public void setGraphicContainerLabel(String graphicContainerLabel)
Sets a label on the container wrapping the SVG.
-
getLegend
public LangLegend getLegend()
Returns language options for accessibility of the legend. If null, create a new one.
-
setLegend
public void setLegend(LangLegend legend)
Sets language options for accessibility of the legend.
-
getRangeSelector
public LangRangeSelector getRangeSelector()
Returns range selector language options for accessibility. If null, create a new one.
-
setRangeSelector
public void setRangeSelector(LangRangeSelector rangeSelector)
Sets range selector language options for accessibility.
-
getScreenReaderSection
public LangScreenReaderSection getScreenReaderSection()
Returns language options for the screen reader information sections added before and after the charts. If null, create a new one.
-
setScreenReaderSection
public void setScreenReaderSection(LangScreenReaderSection screenReaderSection)
Sets language options for the screen reader information sections added before and after the charts.
-
getSeries
public LangSeries getSeries()
Returns lang configuration for different series types. If null, create a new one.
-
setSeries
public void setSeries(LangSeries series)
Sets lang configuration for different series types.
-
getSeriesTypeDescriptions
public LangSeriesTypeDescriptions getSeriesTypeDescriptions()
Returns the descriptions of lesser known series types. If null, create a new one.
-
setSeriesTypeDescriptions
public void setSeriesTypeDescriptions(LangSeriesTypeDescriptions seriesTypeDescriptions)
Sets descriptions of lesser known series types.
-
getSonification
public LangSonification getSonification()
Returns language options for sonification. If null, create a new one.
-
setSonification
public void setSonification(LangSonification sonification)
Sets language options for sonification.
-
getSvgContainerLabel
public String getSvgContainerLabel()
Default:
"Interactive chart"
-
setSvgContainerLabel
public void setSvgContainerLabel(String svgContainerLabel)
-
getSvgContainerTitle
public String getSvgContainerTitle()
Returns the title element text for the chart SVG element. Leave this empty to disable adding the title element. Browsers will display this content when hovering over elements in the chart. Assistive technology may use this element to label the chart.Default:
""
-
setSvgContainerTitle
public void setSvgContainerTitle(String svgContainerTitle)
Sets the title element text for the chart SVG element. Leave this empty to disable adding the title element. Browsers will display this content when hovering over elements in the chart. Assistive technology may use this element to label the chart.
-
getTable
public LangTable getTable()
Returns accessibility language options for the data table. If null, create a new one.
-
setTable
public void setTable(LangTable table)
Sets accessibility language options for the data table.
-
getThousandsSep
public String getThousandsSep()
Returns thousands separator to use when formatting numbers for screen readers.Note that many screen readers will not handle space as a thousands separator, and will consider "11 700" as two numbers.
Default:
""
-
setThousandsSep
public void setThousandsSep(String thousandsSep)
Sets thousands separator to use when formatting numbers for screen readers.Note that many screen readers will not handle space as a thousands separator, and will consider "11 700" as two numbers.
Sets to null to use the separator defined in
Lang.getThousandsSep()
.
-
getZoom
public LangZoom getZoom()
Returns chart and map zoom accessibility language options. If null, create a new one.
-
setZoom
public void setZoom(LangZoom zoom)
Sets chart and map zoom accessibility language options.
-
-