aboutsummaryrefslogtreecommitdiffstats
path: root/resources/src/jquery/jquery.makeCollapsible.js
diff options
context:
space:
mode:
authorBartosz Dziewoński <matma.rex@gmail.com>2023-04-12 23:39:27 +0200
committerBartosz Dziewoński <matma.rex@gmail.com>2023-04-13 05:16:08 +0200
commit9137566ab1db644d1e6f11816f307e8a8ff7446b (patch)
tree81e40971f31fe3717d04b76936c5ed96ae03e762 /resources/src/jquery/jquery.makeCollapsible.js
parentad5e4644cc1dbb00e48728e6a02c82b98871f513 (diff)
downloadmediawikicore-9137566ab1db644d1e6f11816f307e8a8ff7446b.tar.gz
mediawikicore-9137566ab1db644d1e6f11816f307e8a8ff7446b.zip
jquery.makeCollapsible: Use <button> instead of <a>, but styled like a link
Bug: T333357 Change-Id: I06acf7dc19fba13e23d2594f8a41cbc58f973939
Diffstat (limited to 'resources/src/jquery/jquery.makeCollapsible.js')
-rw-r--r--resources/src/jquery/jquery.makeCollapsible.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/resources/src/jquery/jquery.makeCollapsible.js b/resources/src/jquery/jquery.makeCollapsible.js
index 3a6c67ad0d96..58ac806bdbc3 100644
--- a/resources/src/jquery/jquery.makeCollapsible.js
+++ b/resources/src/jquery/jquery.makeCollapsible.js
@@ -257,15 +257,11 @@
// Default toggle link. Only build it when needed to avoid jQuery memory leaks (event data).
var buildDefaultToggleLink = function () {
- return $( '<a>' )
+ return $( '<span>' )
.addClass( 'mw-collapsible-text' )
.text( collapseText )
- .wrap( '<span class="mw-collapsible-toggle mw-collapsible-toggle-default"></span>' )
- .parent()
- .attr( {
- role: 'button',
- tabindex: 0
- } );
+ .wrap( '<button type="button" class="mw-collapsible-toggle mw-collapsible-toggle-default"></button>' )
+ .parent();
};
// Check if this element has a custom position for the toggle link