Merge branch 'MDL-65137' of https://github.com/KietChan/moodle
commit
079697de89
|
@ -239,10 +239,11 @@
|
||||||
// Find all the Aria labels that contain this text.
|
// Find all the Aria labels that contain this text.
|
||||||
var exactLabelMatches = [];
|
var exactLabelMatches = [];
|
||||||
var anyLabelMatches = [];
|
var anyLabelMatches = [];
|
||||||
findPossibleMatches('//*[@aria-label and contains(@aria-label, "' + escapedText +
|
findPossibleMatches('//*[@aria-label and contains(@aria-label, "' + escapedText + '")]' +
|
||||||
'")]', function(match) {
|
'| //img[@alt and contains(@alt, "' + escapedText + '")]', function(match) {
|
||||||
// Add to array depending on if it's an exact or partial match.
|
// Add to array depending on if it's an exact or partial match.
|
||||||
if (match.getAttribute('aria-label').trim() === text) {
|
var attributeData = match.getAttribute('aria-label') || match.getAttribute('alt');
|
||||||
|
if (attributeData.trim() === text) {
|
||||||
exactLabelMatches.push(match);
|
exactLabelMatches.push(match);
|
||||||
} else {
|
} else {
|
||||||
anyLabelMatches.push(match);
|
anyLabelMatches.push(match);
|
||||||
|
|
Loading…
Reference in New Issue