MDL-38661 JavaScript: Ensure that ARIA tags are set when expanding/collapsing content
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 10 Sep 2013 02:22:40 +0000 (03:22 +0100)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 10 Sep 2013 02:22:44 +0000 (03:22 +0100)
course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander-debug.js
course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander-min.js
course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander.js
course/yui/src/categoryexpander/js/categoryexpander.js

index ebcec70..6313e5c 100644 (file)
Binary files a/course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander-debug.js and b/course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander-debug.js differ
index 5219087..fcf1759 100644 (file)
Binary files a/course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander-min.js and b/course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander-min.js differ
index 079ff5b..42aae83 100644 (file)
Binary files a/course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander.js and b/course/yui/build/moodle-course-categoryexpander/moodle-course-categoryexpander.js differ
index 9552b46..ec6f9c1 100644 (file)
@@ -235,11 +235,13 @@ NS.run_expansion = function(categorynode) {
         // To avoid a jump effect, we need to set the height of the children to 0 here before removing the SECTIONCOLLAPSED class.
         categorychildren.setStyle('height', '0');
         categorynode.removeClass(CSS.SECTIONCOLLAPSED);
+        categorynode.setAttribute('aria-expanded', 'true');
         categorychildren.fx.set('reverse', false);
     } else {
         categorychildren.fx.set('reverse', true);
         categorychildren.fx.once('end', function(e, categorynode) {
             categorynode.addClass(CSS.SECTIONCOLLAPSED);
+            categorynode.setAttribute('aria-expanded', 'false');
         }, this, categorynode);
     }