Skip to content

Commit

Permalink
aria-valuetext should appear right after element in a11y view, phetsi…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 18, 2020
1 parent 597c7e3 commit eea5c5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gravity-force-lab_a11y_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ <h3>PDOM & Descriptions for Gravity Force Lab</h3>
valueTextElement.className = "pdom-style";
valueTextElement.style.opacity = 0.55;
valueTextElement.textContent = element.getAttribute( 'aria-valuetext' );
element.parentNode.appendChild( valueTextElement );

// insert directly after the element that has the valuetext. This handles the case if element is last, see https://stackoverflow.com/questions/4793604/how-to-insert-an-element-after-another-element-in-javascript-without-using-a-lib
element.parentNode.insertBefore( valueTextElement, element.nextSibling );
}
}
}
Expand Down

0 comments on commit eea5c5f

Please sign in to comment.