@polymer/iron-a11y-announcer
Advanced tools
Comparing version 3.0.0-pre.12 to 3.0.0-pre.13
@@ -1,6 +0,1 @@ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import { IronA11yAnnouncer } from '../iron-a11y-announcer.js'; | ||
import '@polymer/paper-button/paper-button.js'; | ||
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
/* | ||
@@ -14,2 +9,13 @@ Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
*/ | ||
/* | ||
FIXME(polymer-modulizer): the above comments were extracted | ||
from HTML and may be out of place here. Review them and | ||
then delete this comment! | ||
*/ | ||
import '../../polymer/polymer-legacy.js'; | ||
import { IronA11yAnnouncer } from '../iron-a11y-announcer.js'; | ||
import '../../paper-button/paper-button.js'; | ||
import { Polymer } from '../../polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '../../polymer/lib/utils/html-tag.js'; | ||
Polymer({ | ||
@@ -30,13 +36,5 @@ _template: html` | ||
is: 'x-announces', | ||
hostAttributes: {'aria-hidden': 'true'}, | ||
properties: {message: {type: String}}, | ||
hostAttributes: { | ||
'aria-hidden': 'true' | ||
}, | ||
properties: { | ||
message: { | ||
type: String | ||
} | ||
}, | ||
attached: function() { | ||
@@ -47,8 +45,4 @@ IronA11yAnnouncer.requestAvailability(); | ||
_onTapAnnounce: function() { | ||
this.fire('iron-announce', { | ||
text: this.message.trim() | ||
}, { | ||
bubbles: true | ||
}); | ||
this.fire('iron-announce', {text: this.message.trim()}, {bubbles: true}); | ||
} | ||
}); |
@@ -1,5 +0,53 @@ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import { Polymer as Polymer$0 } from '@polymer/polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
/** | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
/** | ||
`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. | ||
@group Iron Elements | ||
@demo demo/index.html | ||
*/ | ||
/* | ||
FIXME(polymer-modulizer): the above comments were extracted | ||
from HTML and may be out of place here. Review them and | ||
then delete this comment! | ||
*/ | ||
import '../polymer/polymer-legacy.js'; | ||
import { Polymer as Polymer$0 } from '../polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '../polymer/lib/utils/html-tag.js'; | ||
export const IronA11yAnnouncer = Polymer$0({ | ||
@@ -26,11 +74,5 @@ _template: html` | ||
*/ | ||
mode: { | ||
type: String, | ||
value: 'polite' | ||
}, | ||
mode: {type: String, value: 'polite'}, | ||
_text: { | ||
type: String, | ||
value: '' | ||
} | ||
_text: {type: String, value: ''} | ||
}, | ||
@@ -43,3 +85,4 @@ | ||
document.body.addEventListener('iron-announce', this._onIronAnnounce.bind(this)); | ||
document.body.addEventListener( | ||
'iron-announce', this._onIronAnnounce.bind(this)); | ||
}, | ||
@@ -70,3 +113,4 @@ | ||
if (!IronA11yAnnouncer.instance) { | ||
IronA11yAnnouncer.instance = document.createElement('iron-a11y-announcer'); | ||
IronA11yAnnouncer.instance = | ||
document.createElement('iron-a11y-announcer'); | ||
} | ||
@@ -73,0 +117,0 @@ |
@@ -18,14 +18,16 @@ { | ||
"bower": "^1.8.0", | ||
"@polymer/iron-component-page": "3.0.0-pre.12", | ||
"@polymer/iron-demo-helpers": "3.0.0-pre.12", | ||
"@polymer/iron-test-helpers": "3.0.0-pre.12", | ||
"@polymer/paper-button": "3.0.0-pre.12", | ||
"@polymer/test-fixture": "3.0.0-pre.12", | ||
"wct-browser-legacy": "0.0.1-pre.11", | ||
"@webcomponents/webcomponentsjs": "^1.0.0" | ||
"webmat": "^0.2.0", | ||
"@polymer/iron-component-page": "^3.0.0-pre.13", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.13", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.13", | ||
"@polymer/paper-button": "^3.0.0-pre.13", | ||
"@polymer/test-fixture": "^3.0.0-pre.13", | ||
"wct-browser-legacy": "^0.0.1-pre.11", | ||
"@webcomponents/webcomponentsjs": "^2.0.0-0" | ||
}, | ||
"scripts": { | ||
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir ." | ||
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir .", | ||
"format": "webmat && npm run update-types" | ||
}, | ||
"version": "3.0.0-pre.12", | ||
"version": "3.0.0-pre.13", | ||
"resolutions": { | ||
@@ -40,4 +42,4 @@ "inherits": "2.0.3", | ||
"dependencies": { | ||
"@polymer/polymer": "3.0.0-pre.12" | ||
"@polymer/polymer": "^3.0.0-pre.13" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
21544
164
10
+ Added@polymer/polymer@3.5.2(transitive)
- Removed@polymer/polymer@3.0.0-pre.12(transitive)
- Removed@webcomponents/webcomponentsjs@1.3.3(transitive)