Options.js 31 KB

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