Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Setting alt property to undefined breaks link to aria-label #153

@Tronil

Description

@Tronil

Description

If you at any time set the paper-icon-button alt property to undefined (which is easily done when using bindings), it stops updating the aria-label attribute and it gets stuck with the value "undefined".

The problem is in the guard that checks the old value against the current value of the aria-label attribute (the oldValue == label comparison) - it doesn't handle non-string values correctly. oldValue should be converted to a string before comparing.

Expected outcome

Changing the alt property should update the aria-label attribute.

Actual outcome

aria-label will keep having "undefined" as value

Steps to reproduce

  1. Put a paper-icon-button element in the page.
  2. Set the alt property to undefined
  3. Set the alt property to "Some text"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions