Difference between revisions of "ARIA Expanded state"

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

Revision as of 15:03, 11 September 2014

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