googlearchive / core-toolbar

Basic toolbar
7 stars 10 forks source link

Remaining accessibility issues #9

Open alice opened 9 years ago

alice commented 9 years ago

Basic level:

<core-toolbar title="Title"> <!-- aria-label will be set to 'Title' -->
    <paper-icon-button icon="menu" class="nav"></paper-icon-button>
    <!-- title flex span will be placed here -->
    <paper-icon-button icon="refresh" class="action"></paper-icon-button>
    <paper-icon-button icon="more-vert" class="menu"></paper-icon-button>
</core-toolbar>

(class names based on http://www.google.com/design/spec/layout/structure.html#structure-app-bar)

Advanced level:

More advanced:

dfreedm commented 9 years ago

Hmm, the authoring practices for toolbar don't mention title, just aria-label. Is there some other source that suggests using title?

alice commented 9 years ago

I'm suggesting a custom 'title' attribute - since you ask that question, though, it should probably be called something else to avoid confusion - which then generates the flex 'title' div to display the title, and is also used as the accessible label for the whole element. I'm talking about <div flex>Title</div> here: https://www.polymer-project.org/docs/elements/core-elements.html#core-toolbar

dfreedm commented 9 years ago

Ah ok. We can't use title for a few native DOM binding reasons

alice commented 9 years ago

Makes sense. What if it was called something like "data-title"?