Options.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. /* *
  2. *
  3. * (c) 2009-2021 Øystein Moseng
  4. *
  5. * Default options for accessibility.
  6. *
  7. * License: www.highcharts.com/license
  8. *
  9. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  10. *
  11. * */
  12. 'use strict';
  13. import palette from '../../Core/Color/Palette.js';
  14. /**
  15. * Formatter callback for the accessibility announcement.
  16. *
  17. * @callback Highcharts.AccessibilityAnnouncementFormatter
  18. *
  19. * @param {Array<Highcharts.Series>} updatedSeries
  20. * Array of all series that received updates. If an announcement is already
  21. * queued, the series that received updates for that announcement are also
  22. * included in this array.
  23. *
  24. * @param {Highcharts.Series} [addedSeries]
  25. * This is provided if {@link Highcharts.Chart#addSeries} was called, and there
  26. * is a new series. In that case, this argument is a reference to the new
  27. * series.
  28. *
  29. * @param {Highcharts.Point} [addedPoint]
  30. * This is provided if {@link Highcharts.Series#addPoint} was called, and there
  31. * is a new point. In that case, this argument is a reference to the new point.
  32. *
  33. * @return {false|string}
  34. * The function should return a string with the text to announce to the user.
  35. * Return empty string to not announce anything. Return `false` to use the
  36. * default announcement format.
  37. */
  38. /**
  39. * @interface Highcharts.PointAccessibilityOptionsObject
  40. */ /**
  41. * Provide a description of the data point, announced to screen readers.
  42. * @name Highcharts.PointAccessibilityOptionsObject#description
  43. * @type {string|undefined}
  44. * @requires modules/accessibility
  45. * @since 7.1.0
  46. */ /**
  47. * Enable or disable exposing the point to assistive technology
  48. * @name Highcharts.PointAccessibilityOptionsObject#enabled
  49. * @type {boolean|undefined}
  50. * @requires modules/accessibility
  51. * @since 9.0.1
  52. */
  53. /* *
  54. * @interface Highcharts.PointOptionsObject in parts/Point.ts
  55. */ /**
  56. * @name Highcharts.PointOptionsObject#accessibility
  57. * @type {Highcharts.PointAccessibilityOptionsObject|undefined}
  58. * @requires modules/accessibility
  59. * @since 7.1.0
  60. */
  61. /**
  62. * @callback Highcharts.ScreenReaderClickCallbackFunction
  63. *
  64. * @param {global.MouseEvent} evt
  65. * Mouse click event
  66. *
  67. * @return {void}
  68. */
  69. /**
  70. * Creates a formatted string for the screen reader module.
  71. *
  72. * @callback Highcharts.ScreenReaderFormatterCallbackFunction<T>
  73. *
  74. * @param {T} context
  75. * Context to format
  76. *
  77. * @return {string}
  78. * Formatted string for the screen reader module.
  79. */
  80. var options = {
  81. /**
  82. * Options for configuring accessibility for the chart. Requires the
  83. * [accessibility module](https://code.highcharts.com/modules/accessibility.js)
  84. * to be loaded. For a description of the module and information
  85. * on its features, see
  86. * [Highcharts Accessibility](https://www.highcharts.com/docs/accessibility/accessibility-module).
  87. *
  88. * @since 5.0.0
  89. * @requires modules/accessibility
  90. * @optionparent accessibility
  91. */
  92. accessibility: {
  93. /**
  94. * Enable accessibility functionality for the chart.
  95. *
  96. * @since 5.0.0
  97. */
  98. enabled: true,
  99. /**
  100. * Accessibility options for the screen reader information sections
  101. * added before and after the chart.
  102. *
  103. * @since 8.0.0
  104. */
  105. screenReaderSection: {
  106. /**
  107. * Function to run upon clicking the "View as Data Table" link in
  108. * the screen reader region.
  109. *
  110. * By default Highcharts will insert and set focus to a data table
  111. * representation of the chart.
  112. *
  113. * @type {Highcharts.ScreenReaderClickCallbackFunction}
  114. * @since 8.0.0
  115. * @apioption accessibility.screenReaderSection.onViewDataTableClick
  116. */
  117. /**
  118. * Function to run upon clicking the "Play as sound" button in
  119. * the screen reader region.
  120. *
  121. * By default Highcharts will call the `chart.sonify` function.
  122. *
  123. * @type {Highcharts.ScreenReaderClickCallbackFunction}
  124. * @since 8.0.1
  125. * @apioption accessibility.screenReaderSection.onPlayAsSoundClick
  126. */
  127. /**
  128. * A formatter function to create the HTML contents of the hidden
  129. * screen reader information region before the chart. Receives one
  130. * argument, `chart`, referring to the chart object. Should return a
  131. * string with the HTML content of the region. By default this
  132. * returns an automatic description of the chart based on
  133. * [beforeChartFormat](#accessibility.screenReaderSection.beforeChartFormat).
  134. *
  135. * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Chart>}
  136. * @since 8.0.0
  137. * @apioption accessibility.screenReaderSection.beforeChartFormatter
  138. */
  139. /**
  140. * Format for the screen reader information region before the chart.
  141. * Supported HTML tags are `<h1-6>`, `<p>`, `<div>`, `<a>`, `<ul>`,
  142. * `<ol>`, `<li>`, and `<button>`. Attributes are not supported,
  143. * except for id on `<div>`, `<a>`, and `<button>`. Id is required
  144. * on `<a>` and `<button>` in the format `<tag id="abcd">`. Numbers,
  145. * lower- and uppercase letters, "-" and "#" are valid characters in
  146. * IDs.
  147. *
  148. * The headingTagName is an auto-detected heading (h1-h6) that
  149. * corresponds to the heading level below the previous heading in
  150. * the DOM.
  151. *
  152. * @since 8.0.0
  153. */
  154. beforeChartFormat: '<{headingTagName}>{chartTitle}</{headingTagName}>' +
  155. '<div>{typeDescription}</div>' +
  156. '<div>{chartSubtitle}</div>' +
  157. '<div>{chartLongdesc}</div>' +
  158. '<div>{playAsSoundButton}</div>' +
  159. '<div>{viewTableButton}</div>' +
  160. '<div>{xAxisDescription}</div>' +
  161. '<div>{yAxisDescription}</div>' +
  162. '<div>{annotationsTitle}{annotationsList}</div>',
  163. /**
  164. * A formatter function to create the HTML contents of the hidden
  165. * screen reader information region after the chart. Analogous to
  166. * [beforeChartFormatter](#accessibility.screenReaderSection.beforeChartFormatter).
  167. *
  168. * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Chart>}
  169. * @since 8.0.0
  170. * @apioption accessibility.screenReaderSection.afterChartFormatter
  171. */
  172. /**
  173. * Format for the screen reader information region after the chart.
  174. * Analogous to [beforeChartFormat](#accessibility.screenReaderSection.beforeChartFormat).
  175. *
  176. * @since 8.0.0
  177. */
  178. afterChartFormat: '{endOfChartMarker}',
  179. /**
  180. * Date format to use to describe range of datetime axes.
  181. *
  182. * For an overview of the replacement codes, see
  183. * [dateFormat](/class-reference/Highcharts#dateFormat).
  184. *
  185. * @see [point.dateFormat](#accessibility.point.dateFormat)
  186. *
  187. * @since 8.0.0
  188. */
  189. axisRangeDateFormat: '%Y-%m-%d %H:%M:%S'
  190. },
  191. /**
  192. * Accessibility options global to all data series. Individual series
  193. * can also have specific [accessibility options](#plotOptions.series.accessibility)
  194. * set.
  195. *
  196. * @since 8.0.0
  197. */
  198. series: {
  199. /**
  200. * Formatter function to use instead of the default for series
  201. * descriptions. Receives one argument, `series`, referring to the
  202. * series to describe. Should return a string with the description
  203. * of the series for a screen reader user. If `false` is returned,
  204. * the default formatter will be used for that series.
  205. *
  206. * @see [series.description](#plotOptions.series.description)
  207. *
  208. * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Series>}
  209. * @since 8.0.0
  210. * @apioption accessibility.series.descriptionFormatter
  211. */
  212. /**
  213. * Whether or not to add series descriptions to charts with a single
  214. * series.
  215. *
  216. * @since 8.0.0
  217. */
  218. describeSingleSeries: false,
  219. /**
  220. * When a series contains more points than this, we no longer expose
  221. * information about individual points to screen readers.
  222. *
  223. * Set to `false` to disable.
  224. *
  225. * @type {boolean|number}
  226. * @since 8.0.0
  227. */
  228. pointDescriptionEnabledThreshold: 200
  229. },
  230. /**
  231. * Options for descriptions of individual data points.
  232. *
  233. * @since 8.0.0
  234. */
  235. point: {
  236. /**
  237. * Date format to use for points on datetime axes when describing
  238. * them to screen reader users.
  239. *
  240. * Defaults to the same format as in tooltip.
  241. *
  242. * For an overview of the replacement codes, see
  243. * [dateFormat](/class-reference/Highcharts#dateFormat).
  244. *
  245. * @see [dateFormatter](#accessibility.point.dateFormatter)
  246. *
  247. * @type {string}
  248. * @since 8.0.0
  249. * @apioption accessibility.point.dateFormat
  250. */
  251. /**
  252. * Formatter function to determine the date/time format used with
  253. * points on datetime axes when describing them to screen reader
  254. * users. Receives one argument, `point`, referring to the point
  255. * to describe. Should return a date format string compatible with
  256. * [dateFormat](/class-reference/Highcharts#dateFormat).
  257. *
  258. * @see [dateFormat](#accessibility.point.dateFormat)
  259. *
  260. * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Point>}
  261. * @since 8.0.0
  262. * @apioption accessibility.point.dateFormatter
  263. */
  264. /**
  265. * Prefix to add to the values in the point descriptions. Uses
  266. * [tooltip.valuePrefix](#tooltip.valuePrefix) if not defined.
  267. *
  268. * @type {string}
  269. * @since 8.0.0
  270. * @apioption accessibility.point.valuePrefix
  271. */
  272. /**
  273. * Suffix to add to the values in the point descriptions. Uses
  274. * [tooltip.valueSuffix](#tooltip.valueSuffix) if not defined.
  275. *
  276. * @type {string}
  277. * @since 8.0.0
  278. * @apioption accessibility.point.valueSuffix
  279. */
  280. /**
  281. * Decimals to use for the values in the point descriptions. Uses
  282. * [tooltip.valueDecimals](#tooltip.valueDecimals) if not defined.
  283. *
  284. * @type {number}
  285. * @since 8.0.0
  286. * @apioption accessibility.point.valueDecimals
  287. */
  288. /**
  289. * Formatter function to use instead of the default for point
  290. * descriptions.
  291. *
  292. * Receives one argument, `point`, referring to the point to
  293. * describe. Should return a string with the description of the
  294. * point for a screen reader user. If `false` is returned, the
  295. * default formatter will be used for that point.
  296. *
  297. * Note: Prefer using [accessibility.point.valueDescriptionFormat](#accessibility.point.valueDescriptionFormat)
  298. * instead if possible, as default functionality such as describing
  299. * annotations will be preserved.
  300. *
  301. * @see [accessibility.point.valueDescriptionFormat](#accessibility.point.valueDescriptionFormat)
  302. * @see [point.accessibility.description](#series.line.data.accessibility.description)
  303. *
  304. * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Point>}
  305. * @since 8.0.0
  306. * @apioption accessibility.point.descriptionFormatter
  307. */
  308. /**
  309. * Format to use for describing the values of data points
  310. * to assistive technology - including screen readers.
  311. * The point context is available as `{point}`.
  312. *
  313. * Additionally, the series name, annotation info, and
  314. * description added in `point.accessibility.description`
  315. * is added by default if relevant. To override this, use the
  316. * [accessibility.point.descriptionFormatter](#accessibility.point.descriptionFormatter)
  317. * option.
  318. *
  319. * @see [point.accessibility.description](#series.line.data.accessibility.description)
  320. * @see [accessibility.point.descriptionFormatter](#accessibility.point.descriptionFormatter)
  321. *
  322. * @type {string}
  323. * @since 8.0.1
  324. */
  325. valueDescriptionFormat: '{index}. {xDescription}{separator}{value}.'
  326. },
  327. /**
  328. * Amount of landmarks/regions to create for screen reader users. More
  329. * landmarks can make navigation with screen readers easier, but can
  330. * be distracting if there are lots of charts on the page. Three modes
  331. * are available:
  332. * - `all`: Adds regions for all series, legend, menu, information
  333. * region.
  334. * - `one`: Adds a single landmark per chart.
  335. * - `disabled`: No landmarks are added.
  336. *
  337. * @since 7.1.0
  338. * @validvalue ["all", "one", "disabled"]
  339. */
  340. landmarkVerbosity: 'all',
  341. /**
  342. * Link the chart to an HTML element describing the contents of the
  343. * chart.
  344. *
  345. * It is always recommended to describe charts using visible text, to
  346. * improve SEO as well as accessibility for users with disabilities.
  347. * This option lets an HTML element with a description be linked to the
  348. * chart, so that screen reader users can connect the two.
  349. *
  350. * By setting this option to a string, Highcharts runs the string as an
  351. * HTML selector query on the entire document. If there is only a single
  352. * match, this element is linked to the chart. The content of the linked
  353. * element will be included in the chart description for screen reader
  354. * users.
  355. *
  356. * By default, the chart looks for an adjacent sibling element with the
  357. * `highcharts-description` class.
  358. *
  359. * The feature can be disabled by setting the option to an empty string,
  360. * or overridden by providing the
  361. * [accessibility.description](#accessibility.description) option.
  362. * Alternatively, the HTML element to link can be passed in directly as
  363. * an HTML node.
  364. *
  365. * If you need the description to be part of the exported image,
  366. * consider using the [caption](#caption) feature.
  367. *
  368. * If you need the description to be hidden visually, use the
  369. * [accessibility.description](#accessibility.description) option.
  370. *
  371. * @see [caption](#caption)
  372. * @see [description](#accessibility.description)
  373. * @see [typeDescription](#accessibility.typeDescription)
  374. *
  375. * @sample highcharts/accessibility/accessible-line
  376. * Accessible line chart
  377. *
  378. * @type {string|Highcharts.HTMLDOMElement}
  379. * @since 8.0.0
  380. */
  381. linkedDescription: '*[data-highcharts-chart="{index}"] + .highcharts-description',
  382. /**
  383. * A hook for adding custom components to the accessibility module.
  384. * Should be an object mapping component names to instances of classes
  385. * inheriting from the Highcharts.AccessibilityComponent base class.
  386. * Remember to add the component to the
  387. * [keyboardNavigation.order](#accessibility.keyboardNavigation.order)
  388. * for the keyboard navigation to be usable.
  389. *
  390. * @sample highcharts/accessibility/custom-component
  391. * Custom accessibility component
  392. *
  393. * @type {*}
  394. * @since 7.1.0
  395. * @apioption accessibility.customComponents
  396. */
  397. /**
  398. * Theme to apply to the chart when Windows High Contrast Mode is
  399. * detected. By default, a high contrast theme matching the high
  400. * contrast system system colors is used.
  401. *
  402. * @type {*}
  403. * @since 7.1.3
  404. * @apioption accessibility.highContrastTheme
  405. */
  406. /**
  407. * A text description of the chart.
  408. *
  409. * **Note: Prefer using [linkedDescription](#accessibility.linkedDescription)
  410. * or [caption](#caption.text) instead.**
  411. *
  412. * If the Accessibility module is loaded, this option is included by
  413. * default as a long description of the chart in the hidden screen
  414. * reader information region.
  415. *
  416. * Note: Since Highcharts now supports captions and linked descriptions,
  417. * it is preferred to define the description using those methods, as a
  418. * visible caption/description benefits all users. If the
  419. * `accessibility.description` option is defined, the linked description
  420. * is ignored, and the caption is hidden from screen reader users.
  421. *
  422. * @see [linkedDescription](#accessibility.linkedDescription)
  423. * @see [caption](#caption)
  424. * @see [typeDescription](#accessibility.typeDescription)
  425. *
  426. * @type {string}
  427. * @since 5.0.0
  428. * @apioption accessibility.description
  429. */
  430. /**
  431. * A text description of the chart type.
  432. *
  433. * If the Accessibility module is loaded, this will be included in the
  434. * description of the chart in the screen reader information region.
  435. *
  436. * Highcharts will by default attempt to guess the chart type, but for
  437. * more complex charts it is recommended to specify this property for
  438. * clarity.
  439. *
  440. * @type {string}
  441. * @since 5.0.0
  442. * @apioption accessibility.typeDescription
  443. */
  444. /**
  445. * Options for keyboard navigation.
  446. *
  447. * @declare Highcharts.KeyboardNavigationOptionsObject
  448. * @since 5.0.0
  449. */
  450. keyboardNavigation: {
  451. /**
  452. * Enable keyboard navigation for the chart.
  453. *
  454. * @since 5.0.0
  455. */
  456. enabled: true,
  457. /**
  458. * Options for the focus border drawn around elements while
  459. * navigating through them.
  460. *
  461. * @sample highcharts/accessibility/custom-focus
  462. * Custom focus ring
  463. *
  464. * @declare Highcharts.KeyboardNavigationFocusBorderOptionsObject
  465. * @since 6.0.3
  466. */
  467. focusBorder: {
  468. /**
  469. * Enable/disable focus border for chart.
  470. *
  471. * @since 6.0.3
  472. */
  473. enabled: true,
  474. /**
  475. * Hide the browser's default focus indicator.
  476. *
  477. * @since 6.0.4
  478. */
  479. hideBrowserFocusOutline: true,
  480. /**
  481. * Style options for the focus border drawn around elements
  482. * while navigating through them. Note that some browsers in
  483. * addition draw their own borders for focused elements. These
  484. * automatic borders can not be styled by Highcharts.
  485. *
  486. * In styled mode, the border is given the
  487. * `.highcharts-focus-border` class.
  488. *
  489. * @type {Highcharts.CSSObject}
  490. * @since 6.0.3
  491. */
  492. style: {
  493. /** @internal */
  494. color: palette.highlightColor80,
  495. /** @internal */
  496. lineWidth: 2,
  497. /** @internal */
  498. borderRadius: 3
  499. },
  500. /**
  501. * Focus border margin around the elements.
  502. *
  503. * @since 6.0.3
  504. */
  505. margin: 2
  506. },
  507. /**
  508. * Order of tab navigation in the chart. Determines which elements
  509. * are tabbed to first. Available elements are: `series`, `zoom`,
  510. * `rangeSelector`, `chartMenu`, `legend`. In addition, any custom
  511. * components can be added here.
  512. *
  513. * @type {Array<string>}
  514. * @since 7.1.0
  515. */
  516. order: ['series', 'zoom', 'rangeSelector', 'legend', 'chartMenu'],
  517. /**
  518. * Whether or not to wrap around when reaching the end of arrow-key
  519. * navigation for an element in the chart.
  520. * @since 7.1.0
  521. */
  522. wrapAround: true,
  523. /**
  524. * Options for the keyboard navigation of data points and series.
  525. *
  526. * @declare Highcharts.KeyboardNavigationSeriesNavigationOptionsObject
  527. * @since 8.0.0
  528. */
  529. seriesNavigation: {
  530. /**
  531. * Set the keyboard navigation mode for the chart. Can be
  532. * "normal" or "serialize". In normal mode, left/right arrow
  533. * keys move between points in a series, while up/down arrow
  534. * keys move between series. Up/down navigation acts
  535. * intelligently to figure out which series makes sense to move
  536. * to from any given point.
  537. *
  538. * In "serialize" mode, points are instead navigated as a single
  539. * list. Left/right behaves as in "normal" mode. Up/down arrow
  540. * keys will behave like left/right. This can be useful for
  541. * unifying navigation behavior with/without screen readers
  542. * enabled.
  543. *
  544. * @type {string}
  545. * @default normal
  546. * @since 8.0.0
  547. * @validvalue ["normal", "serialize"]
  548. * @apioption accessibility.keyboardNavigation.seriesNavigation.mode
  549. */
  550. /**
  551. * Skip null points when navigating through points with the
  552. * keyboard.
  553. *
  554. * @since 8.0.0
  555. */
  556. skipNullPoints: true,
  557. /**
  558. * When a series contains more points than this, we no longer
  559. * allow keyboard navigation for it.
  560. *
  561. * Set to `false` to disable.
  562. *
  563. * @type {boolean|number}
  564. * @since 8.0.0
  565. */
  566. pointNavigationEnabledThreshold: false
  567. }
  568. },
  569. /**
  570. * Options for announcing new data to screen reader users. Useful
  571. * for dynamic data applications and drilldown.
  572. *
  573. * Keep in mind that frequent announcements will not be useful to
  574. * users, as they won't have time to explore the new data. For these
  575. * applications, consider making snapshots of the data accessible, and
  576. * do the announcements in batches.
  577. *
  578. * @declare Highcharts.AccessibilityAnnounceNewDataOptionsObject
  579. * @since 7.1.0
  580. */
  581. announceNewData: {
  582. /**
  583. * Optional formatter callback for the announcement. Receives
  584. * up to three arguments. The first argument is always an array
  585. * of all series that received updates. If an announcement is
  586. * already queued, the series that received updates for that
  587. * announcement are also included in this array. The second
  588. * argument is provided if `chart.addSeries` was called, and
  589. * there is a new series. In that case, this argument is a
  590. * reference to the new series. The third argument, similarly,
  591. * is provided if `series.addPoint` was called, and there is a
  592. * new point. In that case, this argument is a reference to the
  593. * new point.
  594. *
  595. * The function should return a string with the text to announce
  596. * to the user. Return empty string to not announce anything.
  597. * Return `false` to use the default announcement format.
  598. *
  599. * @sample highcharts/accessibility/custom-dynamic
  600. * High priority live alerts
  601. *
  602. * @type {Highcharts.AccessibilityAnnouncementFormatter}
  603. * @apioption accessibility.announceNewData.announcementFormatter
  604. */
  605. /**
  606. * Enable announcing new data to screen reader users
  607. * @sample highcharts/accessibility/accessible-dynamic
  608. * Dynamic data accessible
  609. */
  610. enabled: false,
  611. /**
  612. * Minimum interval between announcements in milliseconds. If
  613. * new data arrives before this amount of time has passed, it is
  614. * queued for announcement. If another new data event happens
  615. * while an announcement is queued, the queued announcement is
  616. * dropped, and the latest announcement is queued instead. Set
  617. * to 0 to allow all announcements, but be warned that frequent
  618. * announcements are disturbing to users.
  619. */
  620. minAnnounceInterval: 5000,
  621. /**
  622. * Choose whether or not the announcements should interrupt the
  623. * screen reader. If not enabled, the user will be notified once
  624. * idle. It is recommended not to enable this setting unless
  625. * there is a specific reason to do so.
  626. */
  627. interruptUser: false
  628. }
  629. },
  630. /**
  631. * Accessibility options for a data point.
  632. *
  633. * @declare Highcharts.PointAccessibilityOptionsObject
  634. * @since 7.1.0
  635. * @apioption series.line.data.accessibility
  636. */
  637. /**
  638. * Provide a description of the data point, announced to screen readers.
  639. *
  640. * @type {string}
  641. * @since 7.1.0
  642. * @apioption series.line.data.accessibility.description
  643. */
  644. /**
  645. * Set to false to disable accessibility functionality for a specific point.
  646. * The point will not be included in keyboard navigation, and will not be
  647. * exposed to assistive technology.
  648. *
  649. * @type {boolean}
  650. * @since 9.0.1
  651. * @apioption series.line.data.accessibility.enabled
  652. */
  653. /**
  654. * Accessibility options for a series.
  655. *
  656. * @declare Highcharts.SeriesAccessibilityOptionsObject
  657. * @since 7.1.0
  658. * @requires modules/accessibility
  659. * @apioption plotOptions.series.accessibility
  660. */
  661. /**
  662. * Enable/disable accessibility functionality for a specific series.
  663. *
  664. * @type {boolean}
  665. * @since 7.1.0
  666. * @apioption plotOptions.series.accessibility.enabled
  667. */
  668. /**
  669. * Provide a description of the series, announced to screen readers.
  670. *
  671. * @type {string}
  672. * @since 7.1.0
  673. * @apioption plotOptions.series.accessibility.description
  674. */
  675. /**
  676. * Formatter function to use instead of the default for point
  677. * descriptions. Same as `accessibility.point.descriptionFormatter`, but for
  678. * a single series.
  679. *
  680. * @see [accessibility.point.descriptionFormatter](#accessibility.point.descriptionFormatter)
  681. *
  682. * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Point>}
  683. * @since 7.1.0
  684. * @apioption plotOptions.series.accessibility.pointDescriptionFormatter
  685. */
  686. /**
  687. * Expose only the series element to screen readers, not its points.
  688. *
  689. * @type {boolean}
  690. * @since 7.1.0
  691. * @apioption plotOptions.series.accessibility.exposeAsGroupOnly
  692. */
  693. /**
  694. * Keyboard navigation for a series
  695. *
  696. * @declare Highcharts.SeriesAccessibilityKeyboardNavigationOptionsObject
  697. * @since 7.1.0
  698. * @apioption plotOptions.series.accessibility.keyboardNavigation
  699. */
  700. /**
  701. * Enable/disable keyboard navigation support for a specific series.
  702. *
  703. * @type {boolean}
  704. * @since 7.1.0
  705. * @apioption plotOptions.series.accessibility.keyboardNavigation.enabled
  706. */
  707. /**
  708. * Accessibility options for an annotation label.
  709. *
  710. * @declare Highcharts.AnnotationLabelAccessibilityOptionsObject
  711. * @since 8.0.1
  712. * @requires modules/accessibility
  713. * @apioption annotations.labelOptions.accessibility
  714. */
  715. /**
  716. * Description of an annotation label for screen readers and other assistive
  717. * technology.
  718. *
  719. * @type {string}
  720. * @since 8.0.1
  721. * @apioption annotations.labelOptions.accessibility.description
  722. */
  723. /**
  724. * Accessibility options for an axis. Requires the accessibility module.
  725. *
  726. * @declare Highcharts.AxisAccessibilityOptionsObject
  727. * @since 7.1.0
  728. * @requires modules/accessibility
  729. * @apioption xAxis.accessibility
  730. */
  731. /**
  732. * Enable axis accessibility features, including axis information in the
  733. * screen reader information region. If this is disabled on the xAxis, the
  734. * x values are not exposed to screen readers for the individual data points
  735. * by default.
  736. *
  737. * @type {boolean}
  738. * @since 7.1.0
  739. * @apioption xAxis.accessibility.enabled
  740. */
  741. /**
  742. * Description for an axis to expose to screen reader users.
  743. *
  744. * @type {string}
  745. * @since 7.1.0
  746. * @apioption xAxis.accessibility.description
  747. */
  748. /**
  749. * Range description for an axis. Overrides the default range description.
  750. * Set to empty to disable range description for this axis.
  751. *
  752. * @type {string}
  753. * @since 7.1.0
  754. * @apioption xAxis.accessibility.rangeDescription
  755. */
  756. /**
  757. * @optionparent legend
  758. */
  759. legend: {
  760. /**
  761. * Accessibility options for the legend. Requires the Accessibility
  762. * module.
  763. *
  764. * @since 7.1.0
  765. * @requires modules/accessibility
  766. */
  767. accessibility: {
  768. /**
  769. * Enable accessibility support for the legend.
  770. *
  771. * @since 7.1.0
  772. */
  773. enabled: true,
  774. /**
  775. * Options for keyboard navigation for the legend.
  776. *
  777. * @since 7.1.0
  778. * @requires modules/accessibility
  779. */
  780. keyboardNavigation: {
  781. /**
  782. * Enable keyboard navigation for the legend.
  783. *
  784. * @see [accessibility.keyboardNavigation](#accessibility.keyboardNavigation.enabled)
  785. *
  786. * @since 7.1.0
  787. */
  788. enabled: true
  789. }
  790. }
  791. },
  792. /**
  793. * @optionparent exporting
  794. */
  795. exporting: {
  796. /**
  797. * Accessibility options for the exporting menu. Requires the
  798. * Accessibility module.
  799. *
  800. * @since 7.1.0
  801. * @requires modules/accessibility
  802. */
  803. accessibility: {
  804. /**
  805. * Enable accessibility support for the export menu.
  806. *
  807. * @since 7.1.0
  808. */
  809. enabled: true
  810. }
  811. }
  812. };
  813. export default options;