Reviewers: atincheva,

Message:
Note: I only applied the suggested fix (after checking the WAI-ARIA
spec), I haven't tried it with a screenreader (actually, it's so
straightforward I haven't tried it at all).

Description:
Add aria-hidden state to layout panel rulers.

Issue 7646


Please review this at https://gwt-code-reviews.appspot.com/1820807/

Affected files:
  M user/src/com/google/gwt/layout/Layout.gwt.xml
  M user/src/com/google/gwt/layout/client/LayoutImpl.java


Index: user/src/com/google/gwt/layout/Layout.gwt.xml
diff --git a/user/src/com/google/gwt/layout/Layout.gwt.xml b/user/src/com/google/gwt/layout/Layout.gwt.xml index 65797b57adfe4da195bc3e2a0fd5887a6134e7a4..c7a22f55c8ddb0e37b0c4bca3347b63c5aa0b721 100644
--- a/user/src/com/google/gwt/layout/Layout.gwt.xml
+++ b/user/src/com/google/gwt/layout/Layout.gwt.xml
@@ -14,9 +14,12 @@

 <module>
   <inherits name="com.google.gwt.core.Core"/>
-  <inherits name="com.google.gwt.user.UserAgent"/>
+  <inherits name="com.google.gwt.useragent.UserAgent"/>
   <inherits name="com.google.gwt.dom.DOM"/>
   <inherits name="com.google.gwt.animation.Animation"/>
+  <inherits name="com.google.gwt.aria.Aria"/>
+  <!--  LayoutImplIE6 uses c.g.g.u.c.Window -->
+  <inherits name="com.google.gwt.user.Window"/>

   <replace-with class="com.google.gwt.layout.client.LayoutImplIE8">
     <when-type-is class="com.google.gwt.layout.client.LayoutImpl"/>
Index: user/src/com/google/gwt/layout/client/LayoutImpl.java
diff --git a/user/src/com/google/gwt/layout/client/LayoutImpl.java b/user/src/com/google/gwt/layout/client/LayoutImpl.java index a21f3f73914498922d1e32a4a8ab4301519516f8..98163336d59009ced735df50466aca897c19c093 100644
--- a/user/src/com/google/gwt/layout/client/LayoutImpl.java
+++ b/user/src/com/google/gwt/layout/client/LayoutImpl.java
@@ -19,6 +19,7 @@ import static com.google.gwt.dom.client.Style.Unit.EM;
 import static com.google.gwt.dom.client.Style.Unit.EX;
 import static com.google.gwt.dom.client.Style.Unit.PX;

+import com.google.gwt.aria.client.State;
 import com.google.gwt.dom.client.DivElement;
 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.Element;
@@ -62,6 +63,8 @@ class LayoutImpl {
     // extra precision.
     style.setWidth(10, widthUnit);
     style.setHeight(10, heightUnit);
+
+    State.HIDDEN.set(ruler, true);
     return ruler;
   }



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to