PolymerElements / paper-card

A Material Design piece of paper with unique related data
https://www.webcomponents.org/element/PolymerElements/paper-card
98 stars 62 forks source link

aria-label cannot be set explicitly on paper-card #88

Closed whenlit closed 7 years ago

whenlit commented 8 years ago

Description

The Accessibility section of README.md says the aria-label will be set to the value of the heading attribute by default. However, setting the heading always sets the aria-label whether the aria-label attribute is already defined or not, making it impossible to explicitly define an aria-label for the card.

Expected outcome

The aria-label attribute keeps the value set by the programmer.

Actual outcome

The aria-label attribute is set to the value of the heading attribute.

Live Demo

http://jsbin.com/qisubakiwi/1/edit?html,output

Steps to reproduce

  1. Create a paper-card with a heading attribute and an aria-label attribute (or go to the above url)
  2. Open the page in a web browser.
  3. Inspect the paper-card.
  4. Observe the aria-label attribute is set to the value of the heading attribute (the-heading) instead of the explicitly set aria-label attribute (the-aria-label).