Skip to content

Commit 2588787

Browse files
authored
add aria-label attribute to links that open in new tab
1 parent 3799f59 commit 2588787

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

zotero.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ function parseZoteroResults(resultText) {
158158
var j = i + 1
159159
if (doi.startsWith("https://doi.org/")) {
160160
if (dois.length == 1) {
161-
links.push(' <a href="' + doi + '" target="_blank" rel="noopener">Data link.</a>');
161+
links.push(' <a href="' + doi + '" target="_blank" rel="noopener" aria-label="open data in new tab">Data link.</a>');
162162
} else {
163-
links.push(' <a href="' + doi + '" target="_blank" rel="noopener">Data link ' + j + '.</a>');
163+
links.push(' <a href="' + doi + '" target="_blank" rel="noopener" aria-label="open data in new tab">Data link ' + j + '.</a>');
164164
}
165165
}
166166
}
@@ -172,7 +172,7 @@ function parseZoteroResults(resultText) {
172172

173173
function parseItemLink(url) {
174174
if (url)
175-
return '<a href="' + url + '" target="_blank" rel="noopener">Item link.</a>';
175+
return '<a href="' + url + '" target="_blank" rel="noopener" aria-label="open item in new tab">Item link.</a>';
176176
else
177177
return "";
178178
}
@@ -420,4 +420,4 @@ window.onload = function () {
420420
initForm("zoteroSearchForm", expanded);
421421

422422
searchZotero(query, itemType, sort, pageStart);
423-
};
423+
};

0 commit comments

Comments
 (0)