polymerelements / iron-a11y-announcer Goto Github PK
View Code? Open in Web Editor NEWAn element that helps with announcing text through screen readers.
An element that helps with announcing text through screen readers.
On Android with Talkback, the announcements are read 3 times aloud each. Is this intended?
If two messages are announced in quick succession on mac, voiceover only reads the second message. iron-a11y-announcer should probably queue messages and update them at reasonable times so that no messages get dropped.
When using this element in FireFox, errors will be generated after the page is rendered by html2canvas.
html2canvas is a common library for generating an image from the DOM:
https://github.com/niklasvh/html2canvas
html2canvas clones the entire document:
https://github.com/niklasvh/html2canvas/blob/master/src/Clone.js#L56
When that is done, a second iron-a11y-announcer element is constructed and begins listening for events on document.body:
https://github.com/PolymerElements/iron-a11y-announcer/blob/master/iron-a11y-announcer.html#L83
At this point there will be multiple iron-a11y-announcer elements listening for announce events, but the second instance will generate exceptions attempting to call 'this.announce()' method.
iron-a11y-announcer and html2canvas can be used in conjunction.
iron-a11y-announcer generates errors after html2canvas is used.
http://jsfiddle.net/blois/zvgLtmnd/
Examine console output in FireFox.
iron-a11y-announcer
element in the page.iron-a11y-announcer exposes a 'mode' property that users can use to control the politeness setting, but they can only do this if they create the element themselves and not if they or some other component they use like paper-toast uses requestAvailability.
Users should be able to control the politeness when using requestAvailability.
Users cannot control politeness level when using requestAvailability.
With VoiceOver/Chrome: I can't access the text to the right of the announce buttons. Am I supposed to be able to? After reaching the third announce button, I can then access the "hello my name is ava", but the focus ring appears below the buttons and this doesn't seem logical. Same occurs with CHrome OS / Chromevox. I might just be unclear on how this should work though.
Announcer will announce the text 3 times instead of 1.
E.g. Wait a second and you'll hear the text announced 3 times, same happens when clicking on the button http://jsbin.com/bakeqij/2/edit?html,console,output
index.html is not showing anything crome
iron-a11y-announcer.d.ts
is missing an entry for the static IronA11yAnnouncer.requestAvailability()
method. This was discovered while investigating using TypeScript in Chromium's WebUI codebase, and we had to add this manually for now with the following diff
diff --git a/third_party/polymer/v3_0/components-chromium/iron-a11y-announcer/iron-a11y-announcer.d.ts b/third_party/polymer/v3_0/components-chromium/iron-a11y-announcer/iron-a11y-announcer.d.ts
index b60ac3ba18a0..1646ce15f0f0 100644
--- a/third_party/polymer/v3_0/components-chromium/iron-a11y-announcer/iron-a11y-announcer.d.ts
+++ b/third_party/polymer/v3_0/components-chromium/iron-a11y-announcer/iron-a11y-announcer.d.ts
@@ -34,6 +34,7 @@ declare class IronA11yAnnouncer {
*/
announce(text: string): void;
_onIronAnnounce(event: any): void;
+ static requestAvailability(): void;
}
interface IronA11yAnnouncer extends LegacyElementMixin, HTMLElement {
@usergenic
I believe this file is generated automatically at [1], and therefore possibly a bug in the gen-typescript-declarations
tool itself?
[1] https://github.com/PolymerElements/iron-a11y-announcer/blob/master/package.json#L27
Reproducible on demo page.
Clicking any single announce button multiple times in a row will only announce the message once.
Tested on Chrome 53 and Canary.
Per #3 (comment), in ChromeOS, ChromeVox will show a highlight ring around the announcer element and the focused element.
@cdata suggested that we could use some positioning information in the announcer event to make the announcer in the right size/shape to hide the duplicate focus ring.
Announcer won't announce on IE Edge http://jsbin.com/bakeqij/1/edit?html,console,output
When trying to install via Yarn, a version number is required in package.json
.
The package should install without errors.
error Can't add "@bower_components/iron-a11y-announcer": invalid package version undefined.
yarn add PolymerElements/iron-a11y-announcer
No browsers affected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.