Options.js 31 KB

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