[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix tooltip accessibility for screen readers

2017-12-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398611 )

Change subject: Fix tooltip accessibility for screen readers
..


Fix tooltip accessibility for screen readers

By adding an additional aria-label attribute to the tooltip,
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 includes/htmlform/fields/HTMLCheckMatrix.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/htmlform/fields/HTMLCheckMatrix.php 
b/includes/htmlform/fields/HTMLCheckMatrix.php
index dd4e707..df44626 100644
--- a/includes/htmlform/fields/HTMLCheckMatrix.php
+++ b/includes/htmlform/fields/HTMLCheckMatrix.php
@@ -106,6 +106,7 @@
$tooltipAttribs = [
'class' => "mw-htmlform-tooltip 
$tooltipClass",
'title' => 
$this->mParams['tooltips'][$rowLabel],
+   'aria-label' => 
$this->mParams['tooltips'][$rowLabel]
];
$rowLabel .= ' ' . Html::element( 'span', 
$tooltipAttribs, '' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19500c4e8ccbdcb8288b9c2299a29b3f8a31639d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Divadsn 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix tooltip accessibility for screen readers

2017-12-15 Thread Divadsn (Code Review)
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