Skip to content

Commit

Permalink
fix(accessibility): replace aria-current by aria-selected following t…
Browse files Browse the repository at this point in the history
…he application of aria tab pattern
  • Loading branch information
Lausselloic authored and Johann-S committed Oct 29, 2018
1 parent ff6ed4b commit 353791b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const showStep = (step, stepList) => {
}
stepList.forEach(step => {
const trigger = step.querySelector(Selectors.TRIGGER)
trigger.removeAttribute('aria-current')
trigger.setAttribute('aria-selected', 'false')
// if stepper is in linear mode, set disabled attribute on the trigger
if (stepperNode.classList.contains(ClassName.LINEAR)) {
trigger.setAttribute('disabled', 'disabled')
Expand All @@ -39,7 +39,7 @@ const showStep = (step, stepList) => {

step.classList.add(ClassName.ACTIVE)
const currentTrigger = step.querySelector(Selectors.TRIGGER)
currentTrigger.setAttribute('aria-current', 'step')
currentTrigger.setAttribute('aria-selected', 'true')
// if stepper is in linear mode, remove disabled attribute on current
if (stepperNode.classList.contains(ClassName.LINEAR)) {
currentTrigger.removeAttribute('disabled')
Expand Down

0 comments on commit 353791b

Please sign in to comment.