Skip to content

Commit

Permalink
update all a11y views based on sim template, phetsims/a11y-research#65
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 6, 2018
1 parent 77dc1f4 commit 2f53330
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions balloons-and-static-electricity_a11y_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ <h3>Static and Dynamic Descriptions</h3>
element.innerHTML = element.getAttribute( 'aria-label' ) + element.innerHTML;
}
}
if ( element.hasAttribute( 'aria-valuetext' ) ) {

// if the element has aria-valuetext, render this text in a new element so we can see the content of this
// inline attribute
var valueTextElement = document.createElement( 'p' );
valueTextElement.style.opacity = 0.55;
valueTextElement.textContent = '<aria-valuetext: ' + element.getAttribute( 'aria-valuetext' ) + '>';
element.parentNode.appendChild( valueTextElement );
}
}
}

Expand Down

0 comments on commit 2f53330

Please sign in to comment.