Difference between revisions of "ARIA Pressed State"

From Level Access Web Labs
Jump to navigation Jump to search
Line 3: Line 3:
 
<script type="text/javascript">
 
<script type="text/javascript">
 
   function toggle(eID) {
 
   function toggle(eID) {
 +
  alert('jon');
 
     var attr = document.getElementById(eID).getAttribute('aria-pressed');
 
     var attr = document.getElementById(eID).getAttribute('aria-pressed');
 
     document.getElementById(eID).setAttribute('aria-pressed', (attr=='true' ? 'false' : 'true' );
 
     document.getElementById(eID).setAttribute('aria-pressed', (attr=='true' ? 'false' : 'true' );

Revision as of 22:51, 8 July 2014

With button element

Div element with aria-pressed

Italics

Anchor element with aria-pressed

Underline