jenkins-bot has submitted this change and it was merged.

Change subject: Accessibility: Don't arbitrarily override role
......................................................................


Accessibility: Don't arbitrarily override role

Role overrides implicit role of an element. Since here we don't know
the original element type that we are overriding, we shouldn't just
set the role. It might break th, li etc items.

In the long term, we should add a jquery.accessibility lib that can
take into account things like this, without having to write a ton of
code.

Bug: 17616
Change-Id: Ie27df93acbc778396ad54abc5bde9abb3268a86d
Follow-up: If59590de159a2756bf5b859ce48a23e1af7650fa
---
M resources/jquery/jquery.makeCollapsible.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Matmarex: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/jquery/jquery.makeCollapsible.js 
b/resources/jquery/jquery.makeCollapsible.js
index 5ca0b12..597aea1 100644
--- a/resources/jquery/jquery.makeCollapsible.js
+++ b/resources/jquery/jquery.makeCollapsible.js
@@ -363,7 +363,7 @@
 
                        // 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' );
+                       $toggleLink.prop( 'tabIndex', 0 );
 
                        // Initial state
                        if ( options.collapsed || $collapsible.hasClass( 
'mw-collapsed' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie27df93acbc778396ad54abc5bde9abb3268a86d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to