Title: [210295] trunk
Revision
210295
Author
n_w...@apple.com
Date
2017-01-04 15:07:13 -0800 (Wed, 04 Jan 2017)

Log Message

Many new HTML5 input types still exposed as generic AXTextfield
https://bugs.webkit.org/show_bug.cgi?id=109017
<rdar://problem/13658955>

Reviewed by Chris Fleizach.

Source/WebCore:

Provided more detailed role description for input types that
are exposed as standard text fields on the mac.

Changes are covered in modified test expectation.

* English.lproj/Localizable.strings:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore::AXDateTimeFieldText):
(WebCore::AXMonthFieldText):
(WebCore::AXNumberFieldText):
(WebCore::AXWeekFieldText):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXDateTimeFieldText):
(WebCore::AXMonthFieldText):
(WebCore::AXNumberFieldText):
(WebCore::AXWeekFieldText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXDateTimeFieldText):
(WebCore::AXMonthFieldText):
(WebCore::AXNumberFieldText):
(WebCore::AXWeekFieldText):

LayoutTests:

* platform/mac/accessibility/roles-exposed-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (210294 => 210295)


--- trunk/LayoutTests/ChangeLog	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/LayoutTests/ChangeLog	2017-01-04 23:07:13 UTC (rev 210295)
@@ -1,3 +1,13 @@
+2017-01-04  Nan Wang  <n_w...@apple.com>
+
+        Many new HTML5 input types still exposed as generic AXTextfield
+        https://bugs.webkit.org/show_bug.cgi?id=109017
+        <rdar://problem/13658955>
+
+        Reviewed by Chris Fleizach.
+
+        * platform/mac/accessibility/roles-exposed-expected.txt:
+
 2017-01-04  Chris Dumez  <cdu...@apple.com>
 
         Assertion hit on redfin.com: ASSERTION FAILED: collection->length() > 1

Modified: trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt (210294 => 210295)


--- trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt	2017-01-04 23:07:13 UTC (rev 210295)
@@ -247,7 +247,7 @@
 input[type='datetime-local']
       AXRole: AXTextField
       AXSubrole: 
-      AXRoleDescription: text field
+      AXRoleDescription: date and time field
       
 input[type='email']
       AXRole: AXTextField
@@ -272,12 +272,12 @@
 input[type='month']
       AXRole: AXTextField
       AXSubrole: 
-      AXRoleDescription: text field
+      AXRoleDescription: month and year field
       
 input[type='number']
       AXRole: AXTextField
       AXSubrole: 
-      AXRoleDescription: text field
+      AXRoleDescription: number field
       
 input[type='password']
       AXRole: AXTextField
@@ -332,7 +332,7 @@
 input[type='week']
       AXRole: AXTextField
       AXSubrole: 
-      AXRoleDescription: text field
+      AXRoleDescription: week and year field
       
 ins:not([datetime])
       AXRole: AXGroup

Modified: trunk/Source/WebCore/ChangeLog (210294 => 210295)


--- trunk/Source/WebCore/ChangeLog	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/Source/WebCore/ChangeLog	2017-01-04 23:07:13 UTC (rev 210295)
@@ -1,3 +1,36 @@
+2017-01-04  Nan Wang  <n_w...@apple.com>
+
+        Many new HTML5 input types still exposed as generic AXTextfield
+        https://bugs.webkit.org/show_bug.cgi?id=109017
+        <rdar://problem/13658955>
+
+        Reviewed by Chris Fleizach.
+
+        Provided more detailed role description for input types that
+        are exposed as standard text fields on the mac.
+
+        Changes are covered in modified test expectation.
+
+        * English.lproj/Localizable.strings:
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper roleDescription]):
+        * platform/LocalizedStrings.cpp:
+        (WebCore::AXDateTimeFieldText):
+        (WebCore::AXMonthFieldText):
+        (WebCore::AXNumberFieldText):
+        (WebCore::AXWeekFieldText):
+        * platform/LocalizedStrings.h:
+        * platform/efl/LocalizedStringsEfl.cpp:
+        (WebCore::AXDateTimeFieldText):
+        (WebCore::AXMonthFieldText):
+        (WebCore::AXNumberFieldText):
+        (WebCore::AXWeekFieldText):
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::AXDateTimeFieldText):
+        (WebCore::AXMonthFieldText):
+        (WebCore::AXNumberFieldText):
+        (WebCore::AXWeekFieldText):
+
 2017-01-04  Sam Weinig  <s...@webkit.org>
 
         Remove bindings/generic and distribute its contents appropriately

Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (210294 => 210295)


--- trunk/Source/WebCore/English.lproj/Localizable.strings	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings	2017-01-04 23:07:13 UTC (rev 210295)
@@ -850,6 +850,9 @@
 /* accessibility role description for a date field. */
 "date field" = "date field";
 
+/* accessibility role description for a date and time field */
+"date and time field" = "date and time field";
+
 /* role description of ARIA definition role */
 "definition" = "definition";
 
@@ -952,6 +955,9 @@
 /* HTTP result code string */
 "method not allowed" = "method not allowed";
 
+/* accessibility role description for a month field. */
+"month and year field" = "month and year field";
+
 /* HTTP result code string */
 "moved permanently" = "moved permanently";
 
@@ -1012,6 +1018,9 @@
 /* An ARIA accessibility group that acts as a note in a document. */
 "note" = "note";
 
+/* accessibility role description for a number field. */
+"number field" = "number field";
+
 /* accessibility help text for remaining time display */
 "number of seconds of movie remaining" = "number of seconds of movie remaining";
 
@@ -1201,6 +1210,9 @@
 /* An ARIA accessibility group that acts as an dialog. */
 "web dialog" = "web dialog";
 
+/* accessibility role description for a week field. */
+"week and year field" = "week and year field";
+
 /* Option in segmented control for choosing list type in text editing */
 "•" = "•";
 

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (210294 => 210295)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-01-04 23:07:13 UTC (rev 210295)
@@ -2532,6 +2532,8 @@
                 return AXTelephoneFieldText();
             if (input.isURLField())
                 return AXURLFieldText();
+            if (input.isNumberField())
+                return AXNumberFieldText();
             
             // These input types are not enabled on mac yet, we check the type attribute for now.
             auto& type = input.attributeWithoutSynchronization(typeAttr);
@@ -2539,6 +2541,12 @@
                 return AXDateFieldText();
             if (equalLettersIgnoringASCIICase(type, "time"))
                 return AXTimeFieldText();
+            if (equalLettersIgnoringASCIICase(type, "week"))
+                return AXWeekFieldText();
+            if (equalLettersIgnoringASCIICase(type, "month"))
+                return AXMonthFieldText();
+            if (equalLettersIgnoringASCIICase(type, "datetime-local"))
+                return AXDateTimeFieldText();
         }
     }
     

Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (210294 => 210295)


--- trunk/Source/WebCore/platform/LocalizedStrings.cpp	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp	2017-01-04 23:07:13 UTC (rev 210295)
@@ -675,6 +675,26 @@
     return WEB_UI_STRING("time field", "accessibility role description for a time field.");
 }
 
+String AXDateTimeFieldText()
+{
+    return WEB_UI_STRING("date and time field", "accessibility role description for a date and time field.");
+}
+
+String AXMonthFieldText()
+{
+    return WEB_UI_STRING("month and year field", "accessibility role description for a month field.");
+}
+
+String AXNumberFieldText()
+{
+    return WEB_UI_STRING("number field", "accessibility role description for a number field.");
+}
+
+String AXWeekFieldText()
+{
+    return WEB_UI_STRING("week and year field", "accessibility role description for a time field.");
+}
+
 String AXButtonActionVerb()
 {
     return WEB_UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility");

Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (210294 => 210295)


--- trunk/Source/WebCore/platform/LocalizedStrings.h	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h	2017-01-04 23:07:13 UTC (rev 210295)
@@ -177,6 +177,10 @@
     String AXURLFieldText();
     String AXDateFieldText();
     String AXTimeFieldText();
+    String AXDateTimeFieldText();
+    String AXMonthFieldText();
+    String AXNumberFieldText();
+    String AXWeekFieldText();
     
     String AXButtonActionVerb();
     String AXRadioButtonActionVerb();

Modified: trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (210294 => 210295)


--- trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2017-01-04 23:07:13 UTC (rev 210295)
@@ -443,6 +443,26 @@
     return String::fromUTF8("time field");
 }
 
+String AXDateTimeFieldText()
+{
+    return String::fromUTF8("date and time field");
+}
+
+String AXMonthFieldText()
+{
+    return String::fromUTF8("month and year field");
+}
+
+String AXNumberFieldText()
+{
+    return String::fromUTF8("number field");
+}
+
+String AXWeekFieldText()
+{
+    return String::fromUTF8("week and year field");
+}
+
 String AXFooterRoleDescriptionText()
 {
     return String::fromUTF8("footer");

Modified: trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (210294 => 210295)


--- trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2017-01-04 23:05:25 UTC (rev 210294)
+++ trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2017-01-04 23:07:13 UTC (rev 210295)
@@ -491,6 +491,26 @@
     return String::fromUTF8(_("time field"));
 }
 
+String AXDateTimeFieldText()
+{
+    return String::fromUTF8(_("date and time field"));
+}
+
+String AXMonthFieldText()
+{
+    return String::fromUTF8(_("month and year field"));
+}
+
+String AXNumberFieldText()
+{
+    return String::fromUTF8(_("number field"));
+}
+
+String AXWeekFieldText()
+{
+    return String::fromUTF8(_("week and year field"));
+}
+
 String AXFooterRoleDescriptionText()
 {
     return String::fromUTF8(_("footer"));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to