Matmarex has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/72371


Change subject: jquery.makeCollapsible: Togglers accessibility
......................................................................

jquery.makeCollapsible: Togglers accessibility

Use tabindex="0" and role="button" for all togglers, custom or not.

Bug: 17616
Change-Id: If59590de159a2756bf5b859ce48a23e1af7650fa
---
M resources/jquery/jquery.makeCollapsible.js
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/72371/1

diff --git a/resources/jquery/jquery.makeCollapsible.js 
b/resources/jquery/jquery.makeCollapsible.js
index 2823174..3a6c1b1 100644
--- a/resources/jquery/jquery.makeCollapsible.js
+++ b/resources/jquery/jquery.makeCollapsible.js
@@ -358,6 +358,10 @@
                                }
                        }
 
+                       // 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)

-- 
To view, visit https://gerrit.wikimedia.org/r/72371
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If59590de159a2756bf5b859ce48a23e1af7650fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <matma....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to