Skip to content

Commit

Permalink
Avoid overriding tabindex
Browse files Browse the repository at this point in the history
  • Loading branch information
muan committed Sep 25, 2017
1 parent cca3f90 commit 433d459
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/details-element-polyfill/polyfill.coffee.erb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ polyfillFocusAndARIA = ->

addAttributesForSummary = (summary, details) ->
details = findClosestElementWithTagName(summary, "DETAILS") unless details
summary.setAttribute("tabindex", "0")
summary.setAttribute("tabindex", "0") unless summary.hasAttribute("tabindex")
summary.setAttribute("aria-expanded", details.hasAttribute("open"))
summary.setAttribute("role", "button")

Expand Down

0 comments on commit 433d459

Please sign in to comment.