aria-labels for everything

pull/2711/head
John McLear 2015-06-28 17:14:37 +01:00
parent 85d44c8a4e
commit 90575064a9
1 changed files with 3 additions and 0 deletions

View File

@ -862,6 +862,9 @@ window.html10n = (function(window, document, undefined) {
// Apply translation
if (node.children.length === 0 || prop != 'textContent') {
node[prop] = str.str
node.setAttribute("aria-label", str.str); // Sets the aria-label
// The idea of the above is that we always have an aria value
// This might be a bit of an abrupt solution but let's see how it goes
} else {
var children = node.childNodes,
found = false