Merge "jquery.makeCollapsible: Togglers accessibility"
[lhc/web/wiklou.git] / resources / jquery / jquery.makeCollapsible.js
index 2823174..3a6c1b1 100644 (file)
                                }
                        }
 
+                       // Attributes for accessibility. This isn't necessary when the toggler is already
+                       // an <a> or a <button> etc., but it doesn't hurt either, and it's consistent.
+                       $toggleLink.prop( 'tabIndex', 0 ).attr( 'role', 'button' );
+
                        // Initial state
                        if ( options.collapsed || $collapsible.hasClass( 'mw-collapsed' ) ) {
                                // Remove here so that the toggler goes in the right direction (the class is re-added)