[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> a11y.js (summary)

(no description)

File Size: 318 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  addIntroText()
  addContainer()
  clear()
  filterMessage()
  setup()
  speak()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

addIntroText()   X-Ref
Build the explanatory text to be placed before the aria live regions.

This text is initially hidden from assistive technologies by using a `hidden`
HTML attribute which is then removed once a message fills the aria-live regions.

return: {HTMLParagraphElement} The explanatory text HTML element.

addContainer()   X-Ref
Build the live regions markup.

return: {HTMLDivElement} The ARIA live region HTML element.
param: {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.

clear()   X-Ref
Clears the a11y-speak-region elements and hides the explanatory text.


filterMessage(message)   X-Ref
Filter the message to be announced to the screenreader.

return: {string} The filtered message.
param: {string} message The message to be announced.

setup()   X-Ref
Create the live regions.


speak(message, ariaLive)   X-Ref
Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
This module is inspired by the `speak` function in `wp-a11y.js`.

param: {string} message  The message to be announced by assistive technologies.
param: {string} [ariaLive] The politeness level for aria-live; default: 'polite'.



Generated : Wed Nov 25 08:20:02 2020 Cross-referenced by PHPXref