diff -r cbd08125939c modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java --- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java Mon Apr 07 16:04:34 2014 -0700 +++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java Tue Apr 08 10:20:33 2014 -0700 @@ -1424,7 +1424,22 @@ } return false; case ACCELERATOR: return item.getAccelerator(); - case TITLE: return item.getText(); + case TITLE: { + final Label label = getLabel(); + if (label != null) { + String title = (String)label.accGetAttribute(Attribute.TITLE); + if (title != null) return title; + } + return item.getText(); + } + case MNEMONIC: { + final Label label = getLabel(); + if (label != null) { + String mnemonic = (String)label.accGetAttribute(Attribute.MNEMONIC); + if (mnemonic != null) return mnemonic; + } + return null; + } case ENABLED: return !item.isDisable(); case MENU: createSubmenu(); diff -r cbd08125939c modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java --- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java Mon Apr 07 16:04:34 2014 -0700 +++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java Tue Apr 08 10:20:33 2014 -0700 @@ -36,6 +36,7 @@ import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; +import javafx.scene.accessibility.Attribute; import javafx.scene.control.ContentDisplay; import javafx.scene.control.Control; import javafx.scene.control.Label; @@ -1161,4 +1162,24 @@ } } } + + /** @treatAsPrivate */ + @Override public Object accGetAttribute(Attribute attribute, Object... parameters) { + switch (attribute) { + case TITLE: { + if (bindings != null) { + return bindings.getText(); + } + final Labeled labeled = getSkinnable(); + return labeled.getText(); + } + case MNEMONIC: { + if (bindings != null) { + return bindings.getMnemonic(); + } + return null; + } + default: return super.accGetAttribute(attribute, parameters); + } + } } diff -r cbd08125939c modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java --- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java Mon Apr 07 16:04:34 2014 -0700 +++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java Tue Apr 08 10:20:33 2014 -0700 @@ -911,8 +911,9 @@ switch (attribute) { case ROLE: return Role.MENU_ITEM; case MENU_ITEM_TYPE: return Role.CONTEXT_MENU; - case TITLE: return getText(); case FOCUS_ITEM: return MenuBarButton.this; + case TITLE: //fall-thru - super class gets mnemonics right + case MNEMONIC: default: return super.accGetAttribute(attribute, parameters); } } diff -r cbd08125939c modules/controls/src/main/java/javafx/scene/control/Label.java --- a/modules/controls/src/main/java/javafx/scene/control/Label.java Mon Apr 07 16:04:34 2014 -0700 +++ b/modules/controls/src/main/java/javafx/scene/control/Label.java Tue Apr 08 10:20:33 2014 -0700 @@ -186,7 +186,7 @@ @Override public Object accGetAttribute(Attribute attribute, Object... parameters) { switch (attribute) { case ROLE: return Role.TEXT; - case TITLE: return getText(); + case TITLE: // fall-thru - handle accordingly on super class default: return super.accGetAttribute(attribute, parameters); } } diff -r cbd08125939c modules/controls/src/main/java/javafx/scene/control/Labeled.java --- a/modules/controls/src/main/java/javafx/scene/control/Labeled.java Mon Apr 07 16:04:34 2014 -0700 +++ b/modules/controls/src/main/java/javafx/scene/control/Labeled.java Tue Apr 08 10:20:33 2014 -0700 @@ -1075,7 +1075,7 @@ /** @treatAsPrivate */ @Override public Object accGetAttribute(Attribute attribute, Object... parameters) { switch (attribute) { - case TITLE: return getText(); + case TITLE: // let up to string in order to return mnemonic stripped text default: return super.accGetAttribute(attribute, parameters); } } diff -r cbd08125939c modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java --- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java Mon Apr 07 16:04:34 2014 -0700 +++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java Tue Apr 08 10:20:33 2014 -0700 @@ -643,6 +643,27 @@ } break; } + case UIA_AccessKeyPropertyId: { + String mnemonic = (String)getAttribute(MNEMONIC); + if (mnemonic != null) { + variant = new WinVariant(); + variant.vt = WinVariant.VT_BSTR; + variant.bstrVal = "Alt"+mnemonic.toLowerCase(); + } + break; + } + case UIA_AcceleratorKeyPropertyId: { + KeyCombination kc = (KeyCombination)getAttribute(ACCELERATOR); + if (kc != null) { + variant = new WinVariant(); + variant.vt = WinVariant.VT_BSTR; + /* Note: KeyCombination should have a getDisplayText() which encapsulates + * KeystrokeUtils.toString() + */ + variant.bstrVal = kc.toString().replaceAll("Shortcut", "Ctrl"); + } + break; + } case UIA_NamePropertyId: { String name; @@ -667,12 +688,6 @@ */ default: name = (String)getAttribute(TITLE); - if (name != null && name.length() != 0) { - KeyCombination kc = (KeyCombination)getAttribute(ACCELERATOR); - if (kc != null) { - name += "\t" + kc.toString(); - } - } } if (name == null || name.length() == 0) {