Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Add aria-label to buttons #3

Open
ryanflorence opened this issue Jun 25, 2014 · 6 comments
Open

Add aria-label to buttons #3

ryanflorence opened this issue Jun 25, 2014 · 6 comments

Comments

@ryanflorence
Copy link

Buttons w/o a label make no sense to people using a screenreader. This might need to happen on paper-button, but the issue surfaces here.

http://www.w3.org/TR/2011/CR-wai-aria-20110118/states_and_properties#aria-label

dfreedm added a commit that referenced this issue Jul 8, 2014
Kind of a hack, as most icons are descriptively named in our iconsets
Addresses #3
@dfreedm
Copy link
Contributor

dfreedm commented Jul 8, 2014

With 413a41e and a25c5e3, icon buttons should have at least some label at all times, falling back to the name of the icon.

The optimal solution would be to have some sort of contextual message associated with each icon, but the icons are designed to be somewhat context-free.

Leaving open for review with @alice.

@ryanflorence
Copy link
Author

a11y's cousin i18n wants to know if this.icon is a user defined string :P

Users must be able to supply the label in the markup.

@ryanflorence
Copy link
Author

The reason supplying in the markup is important is so that this lib doesn't have to get concerned about i18n and force users into whatever is crafted up.

@alice
Copy link

alice commented Jul 9, 2014

I agree, this could be problematic if the icon names aren't internationalised (and I assume they aren't).

I'd be interested to hear more from @rpflorence about what he has in mind here. Clearly authors using paper-icon-button can add their own aria-labels in a context-sensitive fashion, and use whatever i18n strategy they have for the rest of their text to ensure that the label is correctly localised. So what needs to happen at the component level?

@ryanflorence
Copy link
Author

I might be misunderstanding polymer, will it accept any attribute and pass it along? I thought public properties restricted what it would "transfer" (forgive me, I haven't use polymer in a while). Just need to make sure users can provide aria-labels.

Sent from my iPhone

On Jul 8, 2014, at 8:35 PM, Alice notifications@github.com wrote:

I agree, this could be problematic if the icon names aren't internationalised (and I assume they aren't).

I'd be interested to hear more from @rpflorence about what he has in mind here. Clearly authors using paper-icon-button can add their own aria-labels in a context-sensitive fashion, and use whatever i18n strategy they have for the rest of their text to ensure that the label is correctly localised. So what needs to happen at the component level?


Reply to this email directly or view it on GitHub.

@alice
Copy link

alice commented Jul 9, 2014

Ah - yes, users can provide aria-labels, or any other attribute (including role). Check out @azakus' demo of adding a role attribute: 696503669e9891011adf21d64e47ae149265cafd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants