/* * * * (c) 2009-2020 Øystein Moseng * * Default options for accessibility. * * License: www.highcharts.com/license * * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!! * * */ 'use strict'; /** * Formatter callback for the accessibility announcement. * * @callback Highcharts.AccessibilityAnnouncementFormatter * * @param {Array} updatedSeries * Array of all series that received updates. If an announcement is already * queued, the series that received updates for that announcement are also * included in this array. * * @param {Highcharts.Series} [addedSeries] * This is provided if {@link Highcharts.Chart#addSeries} was called, and there * is a new series. In that case, this argument is a reference to the new * series. * * @param {Highcharts.Point} [addedPoint] * This is provided if {@link Highcharts.Series#addPoint} was called, and there * is a new point. In that case, this argument is a reference to the new point. * * @return {false|string} * The function should return a string with the text to announce to the user. * Return empty string to not announce anything. Return `false` to use the * default announcement format. */ /** * @interface Highcharts.PointAccessibilityOptionsObject */ /** * Provide a description of the data point, announced to screen readers. * @name Highcharts.PointAccessibilityOptionsObject#description * @type {string|undefined} * @requires modules/accessibility * @since 7.1.0 */ /* * * @interface Highcharts.PointOptionsObject in parts/Point.ts */ /** * @name Highcharts.PointOptionsObject#accessibility * @type {Highcharts.PointAccessibilityOptionsObject|undefined} * @requires modules/accessibility * @since 7.1.0 */ /** * @callback Highcharts.ScreenReaderClickCallbackFunction * * @param {global.MouseEvent} evt * Mouse click event * * @return {void} */ /** * Creates a formatted string for the screen reader module. * * @callback Highcharts.ScreenReaderFormatterCallbackFunction * * @param {T} context * Context to format * * @return {string} * Formatted string for the screen reader module. */ var options = { /** * Options for configuring accessibility for the chart. Requires the * [accessibility module](https://code.highcharts.com/modules/accessibility.js) * to be loaded. For a description of the module and information * on its features, see * [Highcharts Accessibility](https://www.highcharts.com/docs/chart-concepts/accessibility). * * @since 5.0.0 * @requires modules/accessibility * @optionparent accessibility */ accessibility: { /** * Enable accessibility functionality for the chart. * * @since 5.0.0 */ enabled: true, /** * Accessibility options for the screen reader information sections * added before and after the chart. * * @since 8.0.0 */ screenReaderSection: { /** * 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. * * @type {Highcharts.ScreenReaderClickCallbackFunction} * @since 8.0.0 * @apioption accessibility.screenReaderSection.onViewDataTableClick */ /** * Function to run upon clicking the "Play as sound" button in * the screen reader region. * * By default Highcharts will call the `chart.sonify` function. * * @type {Highcharts.ScreenReaderClickCallbackFunction} * @since 8.0.1 * @apioption accessibility.screenReaderSection.onPlayAsSoundClick */ /** * 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 * [beforeChartFormat](#accessibility.screenReaderSection.beforeChartFormat). * * @type {Highcharts.ScreenReaderFormatterCallbackFunction} * @since 8.0.0 * @apioption accessibility.screenReaderSection.beforeChartFormatter */ /** * Format for the screen reader information region before the chart. * Supported HTML tags are ``, `

`, `

`, ``, `