Skip to content

Commit 08630cc

Browse files
authored
add aria-label attribute to links that open in new tab
1 parent 8731923 commit 08630cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

public/pasta.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function buildHtml(citations) {
4141
var date = (citation["pub_year"]) ? " Published " + citation["pub_year"] + "" : "";
4242
// default ESIP formatting has trailing period after DOI
4343
var link = (citation["doi"]) ? citation["doi"].slice(0, -1) : "https://portal.edirepository.org/nis/mapbrowse?packageid=" + citation["pid"];
44-
var title = '<a rel="external noopener" href="' + link + '" target="_blank">' + citation["title"] + '</a>';
44+
var title = '<a rel="external noopener" href="' + link + '" target="_blank" aria-label="open data in new tab">' + citation["title"] + '</a>';
4545
var row = '<p><span class="dataset-title">' + title +
4646
'</span><br><span class="dataset-author">' + authors + date +
4747
'</span></p>';
@@ -131,7 +131,7 @@ function buildCitationsFromPasta(pastaDocs) {
131131
link = ("https://portal.edirepository.org/nis/mapbrowse?packageid=" +
132132
doc.getElementsByTagName("packageid")[0].childNodes[0].nodeValue);
133133
}
134-
var title = '<a rel="external noopener" href="' + link + '" target="_blank">' +
134+
var title = '<a rel="external noopener" href="' + link + '" target="_blank" aria-label="open data in new tab">' +
135135
doc.getElementsByTagName("title")[0].childNodes[0].nodeValue.trim() + '</a>';
136136
var row = '<p><span class="dataset-title">' + title +
137137
'</span><br><span class="dataset-author">' + names + date +
@@ -539,4 +539,4 @@ window.onload = function () {
539539
makeAutocomplete("creator", PASTA_LOOKUP["author"]);
540540
makeAutocomplete("taxon", PASTA_LOOKUP["taxonomic"]);
541541
}
542-
};
542+
};

0 commit comments

Comments
 (0)