Use tabindex="0" and role="button" for all togglers, custom or not.
Bug: 17616
Change-Id: If59590de159a2756bf5b859ce48a23e1af7650fa
}
}
+ // 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)