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

feat(accordion): use appropriate aria tags for accessibility #5338

Closed
wants to merge 3 commits into from

Conversation

jeremytowne
Copy link

The id generation in accordion.js, seems a little sketchy - open to ideas about this.

@wesleycho
Copy link
Contributor

Something similar to

var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
would work I think for generating the id attribute - the Math.random usage is not the greatest solution, but is safe IMO.

@jeremytowne
Copy link
Author

Ok, I will update it to be similar to that. Should I be adding the aria tags like

element.attr({
, or is putting them in the template OK?

@wesleycho
Copy link
Contributor

Template is fine

@jeremytowne
Copy link
Author

It looks like the travis ci build failed because of a timeout issue, is there anyway to run a new build against this?

@icfantv
Copy link
Contributor

icfantv commented Jan 26, 2016

Looks ok now.


var id = 'accordiongroup-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
scope.headingId = id + '_tab';
scope.panelId = id + '_panel';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you switch these to - instead of _?

@wesleycho
Copy link
Contributor

Just that switch in those two ids to dashes & this should be good.

@jeremytowne
Copy link
Author

Awsome! Thanks for the feedback.

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.

3 participants