Skip to content

Commit

Permalink
re-generate a11y view for phetsims/scenery-phet#490
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Apr 23, 2019
1 parent dd08855 commit 695b0fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resistance-in-a-wire_a11y_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ <h3>PDOM & Descriptions for Resistance in a Wire</h3>
</script>

<script type="application/javascript">

/**
* Get all 'element' nodes off the parent element, placing them in an array for easy traversal. Note that this
* includes all elements, even those that are 'hidden' or purely for structure.
Expand Down Expand Up @@ -382,6 +381,9 @@ <h3>PDOM & Descriptions for Resistance in a Wire</h3>
var liveObserver = new MutationObserver( function( mutations ) {
mutations.forEach( function( mutation ) {

// Only display added DOM nodes. ariaHerald will remove the content from aria-live elements so that it
// can't be read by the virtual cursor. This registers as a "mutation", but we don't want to display
// the removal.
if ( mutation.addedNodes.length > 0 ) {
var alertText = mutation.target.textContent;

Expand Down

0 comments on commit 695b0fd

Please sign in to comment.