Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(datepicker): add aria labels to arrow buttons #6247

Closed
wants to merge 1 commit into from

Conversation

bifodus
Copy link
Contributor

@bifodus bifodus commented Sep 19, 2016

Fixes #6229

@@ -1,9 +1,9 @@
<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">
<thead>
<tr>
<th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>
<th><button type="button" aria-label="Previous Month" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be localized?

Copy link
Contributor Author

@bifodus bifodus Sep 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. It probably should. I'll see if I can update this to be language agnostic (perhaps using aria-labelledby) so that we don't need to worry about localizing strings.

Edit: In other similar situations in angular-uib, I notice that aria-hidden=true is being used. That seems odd, but maybe it's the correct solution. I'll read up to see if I can improve my ADA chops.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking into it a bit more, I followed the pattern currently being used for the carousel's forward and back buttons, and used aria-hidden=true on the glyphicon, along with a <span class="sr-only">screen-reader text</span>. It doesn't fix the issue with localization (which the carousel also suffers from), but widespread localization of strings is probably big enough for a separate issue. Thoughts?

@wesleycho
Copy link
Contributor

Going to merge this, but leave the issue open as something in need of a solution still.

@wesleycho wesleycho closed this in 3f70d76 Sep 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants