googlearchive / paper-tabs

A tabs à la Material Design
22 stars 21 forks source link

Remaining accessibility issues #22

Closed alice closed 8 years ago

alice commented 10 years ago

Obviously there is the question of associating with the relevant tabpanel element, discussed in #5 - I think this is usable without that (if not ideal).

If a mechanism is later added to programmatically associate a paper-tabs element with a core-pages element (beyond simply having them side by side on the page and sharing data binding), this might be the basic idea:

<!-- attributes in square brackets are written by element, not author -->
<paper-tabs controls="pages" selected=0 [role="tablist"]>
  <paper-tabs [aria-controls="pages.0" role="tab" aria-selected="true"]>
  <paper-tabs [aria-controls="pages.1" role="tab"]>
</paper-tabs>
<core-pages id="pages" [selected="0"]>
  <div [role="tabpanel" id="pages.0"] active>foo</div>
  <div [role="tabpanel" id="pages.1"]>bar</div>
</core-pages>

Obviously all of this depends on paper-tabs and core-pages being in the same scope, but I'd imagine that was the vast majority of cases, if not 100% - let me know if I'm wrong about this. And of course all of the above may have other issues I don't have the in-depth understanding to see! As I said, I think this is usable, though not ideal, without any of this.

kbwatts commented 9 years ago

+1

Also important to re-emphasize Alice's point about the keyboard usability issue - at the moment keyboard users can't use paper-tabs at all :(

You can wrap each tab in a link and use a11y keys, but this is not ideal, and doesn't provide a good solution for when the number of tabs is dynamically generated.

Please keep it in mind for 0.8 if you can :+1:

jannakha commented 9 years ago

+1

Nevraeka commented 9 years ago

:+1: cc/ @marcysutton

arthurevans commented 9 years ago

Ping. Is this waiting on focus design in the MD spec?

arthurevans commented 9 years ago

Not sure if this should be assigned to @azakus or @frankiefu ... Any takers?

dfreedm commented 9 years ago

@cdata

cdata commented 8 years ago

I think that most of this has been resolved. Please re-open if not!