OLD | NEW |
1 iron-a11y-announcer | 1 iron-a11y-announcer |
2 =================== | 2 =================== |
3 | 3 |
4 `iron-a11y-announcer` is a singleton element that is intended to add a11y | 4 `iron-a11y-announcer` is a singleton element that is intended to add a11y |
5 to features that require on-demand announcement from screen readers. In | 5 to features that require on-demand announcement from screen readers. In |
6 order to make use of the announcer, it is best to request its availability | 6 order to make use of the announcer, it is best to request its availability |
7 in the announcing element. | 7 in the announcing element. |
8 | 8 |
9 Example: | 9 Example: |
10 | 10 |
11 Polymer({ | 11 Polymer({ |
12 is: 'x-chatty', | 12 is: 'x-chatty', |
13 attached: function() { | 13 attached: function() { |
14 // This will create the singlton element if it has not | 14 // This will create the singlton element if it has not |
15 // been created yet: | 15 // been created yet: |
16 Polymer.IronA11yAnnouncer.requestAvailability(); | 16 Polymer.IronA11yAnnouncer.requestAvailability(); |
17 } | 17 } |
18 }); | 18 }); |
19 | 19 |
20 After the `iron-a11y-announcer` has been made available, elements can | 20 After the `iron-a11y-announcer` has been made available, elements can |
21 make announces by firing bubbling `iron-announce` events. | 21 make announces by firing bubbling `iron-announce` events. |
22 | 22 |
23 Example: | 23 Example: |
24 | 24 |
25 this.fire('iron-announce', { | 25 this.fire('iron-announce', { |
26 text: 'This is an announcement!' | 26 text: 'This is an announcement!' |
27 }, { bubbles: true }); | 27 }, { bubbles: true }); |
28 | 28 |
29 Note: announcements are only audible if you have a screen reader enabled. | 29 Note: announcements are only audible if you have a screen reader enabled. |
OLD | NEW |