Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/common/dom_util.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/common/dom_util.js b/chrome/browser/resources/chromeos/chromevox/common/dom_util.js |
| index 827b062f30d98049aa1a419fc210cde12b52c8fd..138abac68b6067577a7aa49dec849d18e70c574d 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/common/dom_util.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/common/dom_util.js |
| @@ -480,7 +480,7 @@ cvox.DomUtil.getBaseLabel_ = function(node, recursive, includeControls) { |
| } else if (node.hasAttribute('aria-label')) { |
| label = node.getAttribute('aria-label'); |
| } else if (node.constructor == HTMLImageElement) { |
| - label = cvox.DomUtil.getImageTitle(node); |
| + label = 'img ' + cvox.DomUtil.getImageTitle(node); |
| } else if (node.tagName == 'FIELDSET') { |
| // Other labels will trump fieldset legend with this implementation. |
| // Depending on how this works out on the web, we may later switch this |
| @@ -920,10 +920,13 @@ cvox.DomUtil.getValue = function(node) { |
| */ |
| cvox.DomUtil.getImageTitle = function(node) { |
| var text; |
| + |
| if (node.hasAttribute('alt')) { |
| text = node.alt; |
| + text = 'alt'; |
|
dmazzoni
2016/11/04 18:36:07
i'm assuming this is debugging code?
|
| } else if (node.hasAttribute('title')) { |
| text = node.title; |
| + text = 'title'; |
| } else { |
| var url = node.src; |
| if (url.substring(0, 4) != 'data') { |
| @@ -939,6 +942,7 @@ cvox.DomUtil.getImageTitle = function(node) { |
| } else { |
| text = 'Image'; |
| } |
| + text = 'else ' + text; |
| } |
| return text; |
| }; |