I was having trouble getting screen readers to consistently handle <paper-toggle-button>. I've pared it down to
a very simple example.
I have a tiny custom element:
<polymer-element name="my-button" role="button" aria-pressed="false"
tabindex="0" noscript>
<template>
<link rel="stylesheet" href="whatever">
<button>Hello</button>
</template>
</polymer-element>
On Windows with NVDA, a <my-button> is read as a "Toggle button" (which is correct). But a <my-button style="display: inline-block"> is read as "Button, pressed."
Weirdly the issue reproduces under a lot of circumstances:
- The <link rel="stylesheet"> can point to anything: a stylesheet, a blank page, a 404.
- The inline display value can be block, inline-block, flex, etc.
- Even if the <link>'d stylesheet and the inline style use the same property value for display.
I've tested
this exact example with both NVDA and Windows-Eyes, getting similar results in Chrome 41 and 42.
Note that JSBin only has Polymer 0.3.3, but I've tested locally with 0.5.4 as well.