Difference between revisions of "ARIA Expanded state"

From Level Access Web Labs
Jump to navigation Jump to search
Line 8: Line 8:
 
     <script type="text/javascript">
 
     <script type="text/javascript">
 
       function toggle(obj) {
 
       function toggle(obj) {
      alert(obj.id);
+
 
 
         if (obj.getAttribute('aria-expanded') == 'true') {
 
         if (obj.getAttribute('aria-expanded') == 'true') {
 
           obj.setAttribute('aria-expanded','false');
 
           obj.setAttribute('aria-expanded','false');
Line 14: Line 14:
 
         }
 
         }
 
         else {
 
         else {
 +
      alert(obj.id);
 
           obj.setAttribute('aria-expanded','true');
 
           obj.setAttribute('aria-expanded','true');
 
           obj.nextSibling.className = "";         
 
           obj.nextSibling.className = "";         

Revision as of 15:17, 11 September 2014

Activate the buttons to expand them and set the aria-expanded state to true. Activate again to collapse.