Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

a11y suite - ID must be unique in the DOM #3021

Open robrez opened 8 years ago

robrez commented 8 years ago

a11ysuite complains about duplicate ids across shadow boundaries...

<dom-module id="x-foo">
  <template>
    <paper-checkbox id="checkbox"></paper-checkbox>
  </template>
</dom-module>
//Snippet from paper-checkbox
<div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]">

Resulting output:

Error: Error: AX_HTML_02 (An element's ID must be unique in the DOM) failed on the following elements (1 - 2 of 2):
#checkbox
#checkbox
See https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_html_02 for more information.
  Context.<anonymous> at /bower_components/web-component-tester/data/a11ySuite.js:66

Workaround - I'm excluding that rule from executing like so:

    a11ySuite('default', ['duplicateId']);
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.