JSPM

  • Created
  • Published
  • Downloads 25898
  • Score
    100M100P100Q172065F
  • License BSD-3-Clause

A singleton element that simplifies announcing text to screen readers.

Package Exports

  • @polymer/iron-a11y-announcer
  • @polymer/iron-a11y-announcer/iron-a11y-announcer.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polymer/iron-a11y-announcer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build status

Demo and API docs

##<iron-a11y-announcer>

iron-a11y-announcer is a singleton element that is intended to add a11y to features that require on-demand announcement from screen readers. In order to make use of the announcer, it is best to request its availability in the announcing element.

Example:

Polymer({

  is: 'x-chatty',

  attached: function() {
    // This will create the singleton element if it has not
    // been created yet:
    Polymer.IronA11yAnnouncer.requestAvailability();
  }
});

After the iron-a11y-announcer has been made available, elements can make announces by firing bubbling iron-announce events.

Example:

this.fire('iron-announce', {
  text: 'This is an announcement!'
}, { bubbles: true });

Note: announcements are only audible if you have a screen reader enabled.