diff -r 310d31f074a4 apps/toys/Hello/src/main/java/hello/HelloPieChart.java --- a/apps/toys/Hello/src/main/java/hello/HelloPieChart.java Thu Jun 19 13:28:32 2014 -0700 +++ b/apps/toys/Hello/src/main/java/hello/HelloPieChart.java Fri Jun 20 15:56:14 2014 -0700 @@ -51,6 +51,7 @@ Scene scene = new Scene(pc, 500, 500); + pc.requestFocus(); // avoid scene.getFocusOwner()==null, makes a11y unhappy (when narrator start after the app) stage.setScene(scene); stage.show(); } diff -r 310d31f074a4 modules/controls/src/main/java/javafx/scene/chart/Chart.java --- a/modules/controls/src/main/java/javafx/scene/chart/Chart.java Thu Jun 19 13:28:32 2014 -0700 +++ b/modules/controls/src/main/java/javafx/scene/chart/Chart.java Fri Jun 20 15:56:14 2014 -0700 @@ -42,6 +42,7 @@ import javafx.geometry.Pos; import javafx.geometry.Side; import javafx.scene.Node; +import javafx.scene.accessibility.Attribute; import javafx.scene.control.Label; import javafx.scene.layout.Pane; import javafx.scene.layout.Region; @@ -265,8 +266,10 @@ /** * Creates a new default Chart instance. */ + BooleanProperty accessibiltyOn = new SimpleBooleanProperty(false); public Chart() { titleLabel.setAlignment(Pos.CENTER); + titleLabel.focusTraversableProperty().bind(accessibiltyOn); getChildren().addAll(titleLabel, chartContent); getStyleClass().add("chart"); titleLabel.getStyleClass().add("chart-title"); @@ -275,6 +278,14 @@ chartContent.setManaged(false); } + @Override public Object accGetAttribute(Attribute attribute, Object... parameters) { + if (!accessibiltyOn.get()) { + accessibiltyOn.set(true); + titleLabel.requestFocus(); + } + return super.accGetAttribute(attribute, parameters); + } + // -------------- METHODS ------------------------------------------------------------------------------------------ /** diff -r 310d31f074a4 modules/controls/src/main/java/javafx/scene/chart/PieChart.java --- a/modules/controls/src/main/java/javafx/scene/chart/PieChart.java Thu Jun 19 13:28:32 2014 -0700 +++ b/modules/controls/src/main/java/javafx/scene/chart/PieChart.java Fri Jun 20 15:56:14 2014 -0700 @@ -51,6 +51,8 @@ import javafx.event.EventHandler; import javafx.geometry.Side; import javafx.scene.Node; +import javafx.scene.accessibility.Attribute; +import javafx.scene.accessibility.Role; import javafx.scene.layout.Region; import javafx.scene.shape.Arc; import javafx.scene.shape.ArcTo; @@ -376,6 +378,9 @@ private Text createPieLabel(Data item) { Text text = item.textNode; text.setText(item.getName()); + if (!text.focusTraversableProperty().isBound()) { + text.focusTraversableProperty().bind(accessibiltyOn); + } return text; } @@ -786,7 +791,7 @@ */ public final static class Data { - private Text textNode = new Text(); + private Text textNode;// = new Text(); /** * Next pointer for the next data item : so we can do animation on data delete. */ @@ -939,7 +944,19 @@ * @param name name for Pie * @param value pie value */ - public Data(java.lang.String name, double value) { + public Data(final java.lang.String name, final double value) { + textNode = new Text() { + @Override + public Object accGetAttribute(Attribute attribute, Object... parameters) { + switch (attribute) { + case ROLE: return Role.TEXT; + case DESCRIPTION: return "slice"; + case TITLE: return name + " represents " + (value) + " percent"; + case TOOLTIP: return name + " slice in the " + getChart().getTitle() + " pie char"; + default: return super.accGetAttribute(attribute, parameters); + } + } + }; setName(name); setPieValue(value); textNode.getStyleClass().addAll("text", "chart-pie-label"); diff -r 310d31f074a4 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 Thu Jun 19 13:28:32 2014 -0700 +++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java Fri Jun 20 15:56:14 2014 -0700 @@ -760,6 +760,15 @@ } break; } + case UIA_LocalizedControlTypePropertyId: { + String description = (String)getAttribute(DESCRIPTION); + if (description != null) { + variant = new WinVariant(); + variant.vt = WinVariant.VT_BSTR; + variant.bstrVal = description; + } + break; + } case UIA_HasKeyboardFocusPropertyId: { Boolean focus = (Boolean)getAttribute(FOCUSED); /*