Skip to content

Commit

Permalink
Merge pull request #10871 from colin-marshall/fix/accordion-duplicate…
Browse files Browse the repository at this point in the history
…-id-10870

fix: fix duplicate id's on accordion when id is already set on <li> elements
  • Loading branch information
ncoden authored Jan 21, 2018
2 parents 40d6ec8 + dd020a7 commit 4f95271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/foundation.accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Accordion extends Plugin {
var $el = $(el),
$content = $el.children('[data-tab-content]'),
id = $content[0].id || GetYoDigits(6, 'accordion'),
linkId = el.id || `${id}-label`;
linkId = (el.id) ? `${el.id}-label` : `${id}-label`;

$el.find('a:first').attr({
'aria-controls': id,
Expand Down

0 comments on commit 4f95271

Please sign in to comment.