changeset 7110:90605ca72ec6

RT-36985: [Accessibility, Windows] Make sure the focus stays in the Combo (internally Combo puts the focus in the Text control).
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Thu, 22 May 2014 10:12:44 -0700
parents f17653883d59
children 2ca812fcee42
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Thu May 22 08:50:09 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Thu May 22 10:12:44 2014 -0700
@@ -750,6 +750,18 @@
         public void setFakeFocus(boolean b) {
             setFocused(b);
         }
+
+        @Override public Object accGetAttribute(Attribute attribute, Object... parameters) {
+            switch (attribute) {
+                case FOCUS_ITEM: 
+                    /* Internally comboBox reassign its focus the text field.
+                     * For the accessibility perspective it is more meaningful
+                     * if the focus stays with the comboBox control.
+                     */
+                    return getParent();
+                default: return super.accGetAttribute(attribute, parameters);
+            }
+        }
     }
 
     @Override public Object accGetAttribute(Attribute attribute, Object... parameters) {