Skip to content

[0.8] hostAttributes should respect user-provided defaults #1458

Description

@cdata

First, I would like to clarify that this is a proposal for API change and not a bug report. AFAIK the existing API is working as advertised.

Currently, attribute values specified in hostAttributes will automatically override user-specified values for those attributes. I propose that this should be changed, so that attributes specified in hostAttributes will respect and defer to user-specified values.

One of the more tempting uses of hostAttributes is to set default ARIA attributes like role, and / or related ARIA states and properties. However, hostAttributes is a bad choice for this because you generally want to respect user-provided values for those same attributes.

For anecdotal evidence that the proposed behavior is preferable to the current behavior, please refer to the discussion here: PolymerElements/paper-toggle-button#1 (comment)

Activity

  1. sorvell commented on Apr 28, 2015

    @sorvell
    Contributor

    This sounds reasonable. Will make it so.

  2. self-assigned this
    on Apr 28, 2015
  3. sorvell commented on May 1, 2015

    @sorvell
    Contributor

    Fixed via 85cc721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions