Hoo man has uploaded a new change for review.

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


Change subject: Add extra accessibility labels to jump to citation links
......................................................................

Add extra accessibility labels to jump to citation links

Also moved the scripts and the CSS into the modules folder directly
(like almost all other extensions do) and minor stuff.

Bug: 38141
Change-Id: I60ecd2fc0edf2aee89974d8069cc0b075cda3f93
---
M Cite.i18n.php
M Cite.php
M SpecialCite.php
D modules/ext.cite/ext.cite.js
D modules/ext.rtlcite/ext.rtlcite.css
D modules/ext.specialcite/ext.specialcite.css
6 files changed, 22 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/72/79472/1

diff --git a/Cite.i18n.php b/Cite.i18n.php
index e28e071..ca74aed 100644
--- a/Cite.i18n.php
+++ b/Cite.i18n.php
@@ -73,6 +73,7 @@
        'cite_references_link_many_format_backlink_labels' => 'a b c d e f g h 
i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an 
ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn 
bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn 
co cp cq cr cs ct cu cv cw cx cy cz da db dc dd de df dg dh di dj dk dl dm dn 
do dp dq dr ds dt du dv dw dx dy dz ea eb ec ed ee ef eg eh ei ej ek el em en 
eo ep eq er es et eu ev ew ex ey ez fa fb fc fd fe ff fg fh fi fj fk fl fm fn 
fo fp fq fr fs ft fu fv fw fx fy fz ga gb gc gd ge gf gg gh gi gj gk gl gm gn 
go gp gq gr gs gt gu gv gw gx gy gz ha hb hc hd he hf hg hh hi hj hk hl hm hn 
ho hp hq hr hs ht hu hv hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in 
io ip iq ir is it iu iv iw ix iy iz ja jb jc jd je jf jg jh ji jj jk jl jm jn 
jo jp jq jr js jt ju jv jw jx jy jz ka kb kc kd ke kf kg kh ki kj kk kl km kn 
ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm ln 
lo lp lq lr ls lt lu lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn 
mo mp mq mr ms mt mu mv mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn 
no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi oj ok ol om on 
oo op oq or os ot ou ov ow ox oy oz pa pb pc pd pe pf pg ph pi pj pk pl pm pn 
po pp pq pr ps pt pu pv pw px py pz qa qb qc qd qe qf qg qh qi qj qk ql qm qn 
qo qp qq qr qs qt qu qv qw qx qy qz ra rb rc rd re rf rg rh ri rj rk rl rm rn 
ro rp rq rr rs rt ru rv rw rx ry rz sa sb sc sd se sf sg sh si sj sk sl sm sn 
so sp sq sr ss st su sv sw sx sy sz ta tb tc td te tf tg th ti tj tk tl tm tn 
to tp tq tr ts tt tu tv tw tx ty tz ua ub uc ud ue uf ug uh ui uj uk ul um un 
uo up uq ur us ut uu uv uw ux uy uz va vb vc vd ve vf vg vh vi vj vk vl vm vn 
vo vp vq vr vs vt vu vv vw vx vy vz wa wb wc wd we wf wg wh wi wj wk wl wm wn 
wo wp wq wr ws wt wu wv ww wx wy wz xa xb xc xd xe xf xg xh xi xj xk xl xm xn 
xo xp xq xr xs xt xu xv xw xx xy xz ya yb yc yd ye yf yg yh yi yj yk yl ym yn 
yo yp yq yr ys yt yu yv yw yx yy yz za zb zc zd ze zf zg zh zi zj zk zl zm zn 
zo zp zq zr zs zt zu zv zw zx zy zz',
        'cite_references_link_many_sep'                    => " ",
        'cite_references_link_many_and'                    => " ",
+       'cite_references_link_accessibility_label'         => 'Jump up to 
citation invocation',
 
        # Although I could just use # instead of <li> above and nothing here 
that
        # will break on input that contains linebreaks
@@ -180,6 +181,8 @@
        'cite_references_link_many_format_backlink_labels' => '{{Optional}}',
        'cite_references_link_many_sep' => '{{optional}}',
        'cite_references_link_many_and' => '{{optional}}',
+       'cite_references_link_accessibility_label' => 'Text for screenreader 
users used instead of "↑" to describe the purpose of the jump to citation 
links.';
+
        'cite_references_prefix' => '{{notranslate}}',
        'cite_references_suffix' => '{{notranslate}}',
 );
diff --git a/Cite.php b/Cite.php
index 0f95765..7b8e130 100644
--- a/Cite.php
+++ b/Cite.php
@@ -28,10 +28,10 @@
        'descriptionmsg' => 'cite-desc',
        'url' => 'https://www.mediawiki.org/wiki/Extension:Cite/Cite.php'
 );
-$wgParserTestFiles[] = dirname( __FILE__ ) . "/citeParserTests.txt";
-$wgParserTestFiles[] = dirname( __FILE__ ) . "/citeCatTreeParserTests.txt";
-$wgExtensionMessagesFiles['Cite'] = dirname( __FILE__ ) . "/Cite.i18n.php";
-$wgAutoloadClasses['Cite'] = dirname( __FILE__ ) . "/Cite_body.php";
+$wgParserTestFiles[] = __DIR__ . "/citeParserTests.txt";
+$wgParserTestFiles[] = __DIR__ . "/citeCatTreeParserTests.txt";
+$wgExtensionMessagesFiles['Cite'] = __DIR__ . "/Cite.i18n.php";
+$wgAutoloadClasses['Cite'] = __DIR__ . "/Cite_body.php";
 $wgSpecialPageGroups['Cite'] = 'pagetools';
 
 define( 'CITE_DEFAULT_GROUP', '' );
@@ -66,13 +66,19 @@
 
 // Resources
 $citeResourceTemplate = array(
-       'localBasePath' => dirname(__FILE__) . '/modules',
+       'localBasePath' => __DIR__ . '/modules',
        'remoteExtPath' => 'Cite/modules'
 );
 
 $wgResourceModules['ext.cite'] = $citeResourceTemplate + array(
-       'styles' => array(),
-       'scripts' => 'ext.cite/ext.cite.js',
+       'scripts' => 'ext.cite.js',
+       'messages' => array(
+               'cite_references_link_accessibility_label'
+       )
+);
+
+$wgResourceModules['ext.cite.popups'] = $citeResourceTemplate + array(
+       'scripts' => 'ext.cite.popups.js',
        'position' => 'bottom',
        'dependencies' => array(
                'jquery.tooltip',
@@ -87,7 +93,7 @@
 
 /* Add RTL fix for the cite <sup> elements */
 $wgResourceModules['ext.rtlcite'] = $citeResourceTemplate + array(
-       'styles' => 'ext.rtlcite/ext.rtlcite.css',
+       'styles' => 'ext.rtlcite.css',
        'position' => 'top',
 );
 
@@ -99,8 +105,9 @@
 function wfCiteBeforePageDisplay( $out, &$sk ) {
        global $wgCiteEnablePopups;
 
+       $out->addModules( 'ext.cite' );
        if ( $wgCiteEnablePopups ) {
-               $out->addModules( 'ext.cite' );
+               $out->addModules( 'ext.cite.popups' );
        }
 
        /* RTL support quick-fix module */
diff --git a/SpecialCite.php b/SpecialCite.php
index 6d9b813..5990f54 100644
--- a/SpecialCite.php
+++ b/SpecialCite.php
@@ -22,7 +22,7 @@
        'url' => 
'https://www.mediawiki.org/wiki/Extension:Cite/Special:Cite.php'
 );
 
-$dir = dirname( __FILE__ ) . '/';
+$dir = __DIR__ . '/';
 # Internationalisation file
 $wgExtensionMessagesFiles['SpecialCite'] = $dir . 'SpecialCite.i18n.php';
 $wgExtensionMessagesFiles['SpecialCiteAliases'] = $dir . 
'SpecialCite.alias.php';
@@ -35,12 +35,12 @@
 
 // Resources
 $citeResourceTemplate = array(
-       'localBasePath' => dirname(__FILE__) . '/modules',
+       'localBasePath' => __DIR__ . '/modules',
        'remoteExtPath' => 'Cite/modules'
 );
 
 $wgResourceModules['ext.specialcite'] = $citeResourceTemplate + array(
-       'styles' => 'ext.specialcite/ext.specialcite.css',
+       'styles' => 'ext.specialcite.css',
        'scripts' => array(),
        'position' => 'bottom',
 );
diff --git a/modules/ext.cite/ext.cite.js b/modules/ext.cite/ext.cite.js
deleted file mode 100644
index dc7328b..0000000
--- a/modules/ext.cite/ext.cite.js
+++ /dev/null
@@ -1,12 +0,0 @@
-( function($) {
-       $( function() {
-               $('.biblio-cite-link,sup.reference a').tooltip({
-                               bodyHandler: function() {
-                                       return $( '#' + this.hash.substr(1) + ' 
> .reference-text' )
-                                               .html();
-                               },
-                               showURL : false
-                       } );
-       } );
-       
-} )( jQuery );
diff --git a/modules/ext.rtlcite/ext.rtlcite.css 
b/modules/ext.rtlcite/ext.rtlcite.css
deleted file mode 100644
index 9b88d53..0000000
--- a/modules/ext.rtlcite/ext.rtlcite.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Isolation to fix references in case of RTL words at the end of a reference 
*/
-sup.reference {
-       unicode-bidi: -moz-isolate;
-       unicode-bidi: -webkit-isolate;
-       unicode-bidi: isolate;
-}
diff --git a/modules/ext.specialcite/ext.specialcite.css 
b/modules/ext.specialcite/ext.specialcite.css
deleted file mode 100644
index 65a4e40..0000000
--- a/modules/ext.specialcite/ext.specialcite.css
+++ /dev/null
@@ -1,14 +0,0 @@
-.mw-specialcite-bibliographic {
-       border: 1px solid grey; 
-       background: #E6E8FA; 
-       width: 90%; 
-       padding: 15px 30px 15px 30px; 
-       margin: 10px auto;
-}
-.mw-specialcite-styles {
-       border: 1px solid grey; 
-       width: 90%; 
-       padding: 15px 30px 15px 30px;
-       margin: 10px auto;
-}
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60ecd2fc0edf2aee89974d8069cc0b075cda3f93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>

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

Reply via email to