Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility Audit #432

Open
1 of 18 tasks
kristoferjoseph opened this issue Oct 21, 2013 · 8 comments
Open
1 of 18 tasks

Accessibility Audit #432

kristoferjoseph opened this issue Oct 21, 2013 · 8 comments

Comments

@kristoferjoseph
Copy link
Member

Accessibility Aduit

@majornista Was kind enough to walk us through an audit of our demo page http://topcoat.io/topcoat

  • Add labels - Topcoat.io drop down
  • Update icon button for slide out menu in Topcoat.io to be a button *like all other topcoat buttons
  • Add name to all inputs
  • Add ids with comment to update them in your application
  • Add examples for how to label inputs to add context for what property is manipulated
  • Add display none to the item that is slid out of view for switch
  • Add labels for icon button icons. Can use :before to add icon and offset the label text.
  • Add min, max, and value for range
  • Add label to search input *Invisible label for assistive technology
  • Up the luminosity level for text 13px and lower 4+ contrast ratio
  • Up the luminosity level for links 3/1 contrast ratio
  • Add focus ring to all links on the demo http://topcoat.io/topcoat *We added it to our controls, but not generic links like the show / hide snipets
  • Add aria-labels to tab bar to describe it as a tab group.
  • Add aria-labels to tab item to describe what is active tab
  • Add aria-labels to tab item to describe what number tab it is
  • Add label to associate tab and content container
  • Add hidden label to notification to add context as to what it is displaying for blind users
  • Switch might not need On / Off label since it has both a color change and slide action to describe state change?

Tools used:

@majornista
Copy link
Contributor

Here's a CodePen http://codepen.io/majornista/pen/HEkdv that implements changes to the Tab Bar with a little jQuery plugin experiment so that the radio buttons are properly identified as tabs using WAI-ARIA. One important change is to use span rather than button for the tab label. The button becomes another tab stop that receives focus and interferes with a keyboard/screen reader user's operation of the control.

@kristoferjoseph
Copy link
Member Author

Love it!
Was wondering why we had the double tab stop. Thanks!
I am really not a fan of all the JS needed to add aria attributes. Sad this is the only reliable way to be accessible :(

@majornista
Copy link
Contributor

Actually, if you add the roles, ids, aria-labelledby and aria-controls attributes statically, the only javascript you need to worry about is for the on change event handler, which updates the aria-selected values on the tabs and the aria-hidden and hidden attributes of the tabpanels. You'd need javascript to display the appropriate tabpanel anyway.

@kristoferjoseph
Copy link
Member Author

That sounds fine.
I was planning on using a sibling selector to add display: none to the tab panel to avoid js, but you are correct we would still need to add the accessibility attributes for the selected section.
Thanks for all the work on this. Very exciting to have an accessible tab set!

@majornista
Copy link
Contributor

Simplified javascript with mostly static WAI-ARIA attributes: http://cdpn.io/bklzE. Also, for backward compatibility, I use fieldset and a hidden legend labeling the radio button group as a tablist.

@majornista
Copy link
Contributor

@kristoferjoseph Does Topcoat have a generic label style that assigns the color for use with inputs? Radio button and checkbox labels have color: var-color, but there doesn't seem to be a style for a generic label.

@kristoferjoseph
Copy link
Member Author

No, we haven't taken on a generic label yet. Have any suggestions?

@majornista
Copy link
Contributor

I was just going to add .topcoat__label have it be an inline text element using color: var-color so that it matches the radio button and checkbox label text.

There's also a question as to how it should align with the inputs. .reset-input() sets vertical-align: top, which, depending on the input, could look off with inline labels.

Positioning of labels can often be application UI specific, so I'm not sure how far you'd want to go with providing classes for different types of positioning.

@GarthDB GarthDB added this to Icebox in Aeon Worm (v1.0.0) Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants