Divadsn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/398611 )
Change subject: Fix tooltip accessibility for screen readers
..
Fix tooltip accessibility for screen readers
By replacing original-title attribute with aria-label,
we can ensure that every tooltip will be accessible
for accessibility tools like screen readers.
Works with Echo extension, but I am not sure if there
are extensions who are using the original-title attribute.
Tested with ChromeVox on Chrome 62.0.3202.94.
Bug: T54711
Change-Id: I19500c4e8ccbdcb8288b9c2299a29b3f8a31639d
---
M resources/src/jquery.tipsy/jquery.tipsy.js
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/11/398611/1
diff --git a/resources/src/jquery.tipsy/jquery.tipsy.js
b/resources/src/jquery.tipsy/jquery.tipsy.js
index ddda432..dc719cf 100644
--- a/resources/src/jquery.tipsy/jquery.tipsy.js
+++ b/resources/src/jquery.tipsy/jquery.tipsy.js
@@ -111,8 +111,8 @@
fixTitle: function() {
var $e = this.$element;
-if ($e.attr('title') || typeof($e.attr('original-title')) !=
'string') {
-$e.attr('original-title', $e.attr('title') ||
'').removeAttr('title');
+if ($e.attr('title') || typeof($e.attr('aria-label')) != 'string')
{
+$e.attr('aria-label', $e.attr('title') ||
'').removeAttr('title');
}
},
@@ -120,7 +120,7 @@
var title, $e = this.$element, o = this.options;
this.fixTitle();
if (typeof o.title == 'string') {
-title = $e.attr(o.title == 'title' ? 'original-title' :
o.title);
+title = $e.attr(o.title == 'title' ? 'aria-label' : o.title);
} else if (typeof o.title == 'function') {
title = o.title.call($e[0]);
}
@@ -257,7 +257,7 @@
* @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
*if there are no viewable region edges effecting the tooltip's
*gravity. It will try to vary from this minimally, for example,
- *if 'sw' is preferred and an element is near the right viewable
+ *if 'sw' is preferred and an element is near the right viewable
*region edge, but not the top edge, it will set the gravity for
*that element's tooltip to be 'se', preserving the southern
*component.
--
To view, visit https://gerrit.wikimedia.org/r/398611
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I19500c4e8ccbdcb8288b9c2299a29b3f8a31639d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Divadsn
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits