| author | Max Li | 2012-02-07 12:36:42 (EST) |
|---|---|---|
| committer | sfranklin | 2012-02-07 12:36:42 (EST) |
| commit | 6485169301995f44e8f4112dc7db9c2c76f6cfb0 (patch) (side-by-side diff) | |
| tree | 13cb54082396dd667ea5c1147a5e704e7407b628 | |
| parent | 8009a84df25e0fb582834004f4d1140851f0590c (diff) | |
| download | org.eclipse.orion.client-6485169301995f44e8f4112dc7db9c2c76f6cfb0.zip org.eclipse.orion.client-6485169301995f44e8f4112dc7db9c2c76f6cfb0.tar.gz org.eclipse.orion.client-6485169301995f44e8f4112dc7db9c2c76f6cfb0.tar.bz2 | |
Bug 370229 - Command image buttons cannot be used via keyboard
Add ARIA label to images
| -rw-r--r-- | bundles/org.eclipse.orion.client.core/web/orion/commands.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/commands.js b/bundles/org.eclipse.orion.client.core/web/orion/commands.js index 0c3f2ac..cbdf728 100644 --- a/bundles/org.eclipse.orion.client.core/web/orion/commands.js +++ b/bundles/org.eclipse.orion.client.core/web/orion/commands.js @@ -941,6 +941,11 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'dijit/Menu', 'dijit/form/Drop dojo.addClass(element, "commandMissingImageButton commandButton"); } else { image = addImageToElement(this, element, name); + // ensure there is accessible text describing this image + var label = this.name || this.tooltip; + if (label) { + dojo.attr(element, "aria-label", label); + } } this._hookCallback(element, context); var overClass = image ? "commandImageOver" : "commandButtonOver"; |

