utils.aria namespace
Enumerations
Enumeration | Description |
|---|---|
ARIA state values for LivePriority. Copied from Closure's goog.a11y.aria.LivePriority | |
A valid ARIA role for a Blockly DOM element. See also setRole() and getRole(). This should be used instead of directly setting an element's role attribute. | |
A possible ARIA attribute state for a Blockly DOM element. See also setState() and getState(). This should be used instead of directly setting aria-* attributes on elements. | |
Used to control how verbose generated a11y labels are. |
Functions
Function | Description |
|---|---|
Requests that the specified text be read to the user if a screen reader is currently active. This relies on a centrally managed ARIA live region that is hidden from the visual DOM. This live region is designed to try and ensure the text is read, including if the same text is issued multiple times consecutively. Note that Callers should use this judiciously. It's often considered bad practice to over-announce information that can be inferred from other sources on the page, so this ought to be used only when certain context cannot be easily determined (such as dynamic states that may not have perfect ARIA representations or indications). | |
Clears the specified ARIA state by removing any related attributes from the specified element that have been set using setState(). | |
Returns the ARIA role of the specified element, or null if it either doesn't have a designated role or if that role is unknown. | |
Returns a string representation of the specified state for the specified element, or null if it's not defined or specified. Note that an explicit set state of 'null' will return the 'null' string, not the value null. | |
Creates an ARIA live region under the specified parent Element to be used for all dynamic announcements via | |
Removes the ARIA role from an element. Similar to Closure's goog.a11y.aria.removeRole | |
Updates the specific role for the specified element. | |
Sets the specified ARIA state by its name and value for the specified element. Note that the type of value is not validated against the specific type of state being changed, so it's up to callers to ensure the correct value is used for the given state. |
Interfaces
Interface | Description |
|---|---|
Customization options that can be passed when using |