Title: [152136] trunk/Source/WebInspectorUI
Revision
152136
Author
[email protected]
Date
2013-06-27 16:04:34 -0700 (Thu, 27 Jun 2013)

Log Message

Web Inspector: AX: Console log of the Inspector does not announce output for screen readers
https://bugs.webkit.org/show_bug.cgi?id=115976

Patch by James Craig <[email protected]> on 2013-06-27
Reviewed by Timothy Hatcher.

Main console log area (div.console-messages) is now an ARIA live region (role="log")
so screen readers speak plain text updates.

Also added contextual labels (e.g. input/output) but speech output verification of
those is currently blocked by http://webkit.org/b/118096

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ConsoleCommand.js:
(WebInspector.ConsoleCommand.prototype.toMessageElement):
* UserInterface/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* UserInterface/LogContentView.css:
(@media reader):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (152135 => 152136)


--- trunk/Source/WebInspectorUI/ChangeLog	2013-06-27 23:00:42 UTC (rev 152135)
+++ trunk/Source/WebInspectorUI/ChangeLog	2013-06-27 23:04:34 UTC (rev 152136)
@@ -1,3 +1,27 @@
+2013-06-27  James Craig  <[email protected]>
+
+        Web Inspector: AX: Console log of the Inspector does not announce output for screen readers
+        https://bugs.webkit.org/show_bug.cgi?id=115976
+
+        Reviewed by Timothy Hatcher.
+
+        Main console log area (div.console-messages) is now an ARIA live region (role="log")
+        so screen readers speak plain text updates.
+        
+        Also added contextual labels (e.g. input/output) but speech output verification of
+        those is currently blocked by http://webkit.org/b/118096
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/ConsoleCommand.js:
+        (WebInspector.ConsoleCommand.prototype.toMessageElement):
+        * UserInterface/ConsoleCommandResult.js:
+        (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
+        * UserInterface/LogContentView.css:
+        (@media reader):
+        * UserInterface/LogContentView.js:
+        (WebInspector.LogContentView):
+
+
 2013-06-27  Matthew Holden  <[email protected]>
 
         Web Inspector: Display color picker in popover on color swatch click

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (152135 => 152136)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2013-06-27 23:00:42 UTC (rev 152135)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2013-06-27 23:04:34 UTC (rev 152136)
@@ -192,6 +192,7 @@
 localizedStrings["Images"] = "Images";
 localizedStrings["Inherited From: "] = "Inherited From: ";
 localizedStrings["Initiator"] = "Initiator";
+localizedStrings["Input: "] = "Input: ";
 localizedStrings["Inspect"] = "Inspect";
 localizedStrings["Invalidate Layout"] = "Invalidate Layout";
 localizedStrings["Invalidate Styles"] = "Invalidate Styles";
@@ -255,6 +256,7 @@
 localizedStrings["Original"] = "Original";
 localizedStrings["Original formatting"] = "Original formatting";
 localizedStrings["Originally %s"] = "Originally %s";
+localizedStrings["Output: "] = "Output: ";
 localizedStrings["Other"] = "Other";
 localizedStrings["Other Issue"] = "Other Issue";
 localizedStrings["Page Issue"] = "Page Issue";

Modified: trunk/Source/WebInspectorUI/UserInterface/ConsoleCommand.js (152135 => 152136)


--- trunk/Source/WebInspectorUI/UserInterface/ConsoleCommand.js	2013-06-27 23:00:42 UTC (rev 152135)
+++ trunk/Source/WebInspectorUI/UserInterface/ConsoleCommand.js	2013-06-27 23:04:34 UTC (rev 152136)
@@ -73,6 +73,7 @@
             this._element = document.createElement("div");
             this._element.command = this;
             this._element.className = "console-user-command";
+            this._element.setAttribute("data-labelprefix", WebInspector.UIString("Input: "));
 
             this._formatCommand();
             this._element.appendChild(this._formattedCommand);

Modified: trunk/Source/WebInspectorUI/UserInterface/ConsoleCommandResult.js (152135 => 152136)


--- trunk/Source/WebInspectorUI/UserInterface/ConsoleCommandResult.js	2013-06-27 23:00:42 UTC (rev 152135)
+++ trunk/Source/WebInspectorUI/UserInterface/ConsoleCommandResult.js	2013-06-27 23:04:34 UTC (rev 152136)
@@ -46,6 +46,7 @@
     {
         var element = WebInspector.ConsoleMessageImpl.prototype.toMessageElement.call(this);
         element.classList.add("console-user-command-result");
+        element.setAttribute("data-labelprefix", WebInspector.UIString("Output: "));
         return element;
     },
 

Modified: trunk/Source/WebInspectorUI/UserInterface/LogContentView.css (152135 => 152136)


--- trunk/Source/WebInspectorUI/UserInterface/LogContentView.css	2013-06-27 23:00:42 UTC (rev 152135)
+++ trunk/Source/WebInspectorUI/UserInterface/LogContentView.css	2013-06-27 23:04:34 UTC (rev 152136)
@@ -487,3 +487,14 @@
 .search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected {
     background-color: rgba(235, 215, 38, 0.75);
 }
+
+/* @media reader currently blocked by: http://webkit.org/b/118096 */
+@media reader {
+    .console-user-command::before, 
+    .console-messages:focus .console-item.selected .console-user-command::before,
+    .console-user-command-result.console-log-level::before,
+    .console-messages:focus .console-item.selected .console-user-command-result.console-log-level::before {
+        /* accessible label alternative for icon indicating console input/output/warning/error, etc. */
+        content: attr(data-labelprefix);
+    }
+}

Modified: trunk/Source/WebInspectorUI/UserInterface/LogContentView.js (152135 => 152136)


--- trunk/Source/WebInspectorUI/UserInterface/LogContentView.js	2013-06-27 23:00:42 UTC (rev 152135)
+++ trunk/Source/WebInspectorUI/UserInterface/LogContentView.js	2013-06-27 23:04:34 UTC (rev 152136)
@@ -35,6 +35,7 @@
     this.messagesElement = document.createElement("div");
     this.messagesElement.className = "console-messages";
     this.messagesElement.tabIndex = 0;
+    this.messagesElement.setAttribute("role", "log");
     this.messagesElement.addEventListener("mousedown", this._mousedown.bind(this));
     this.messagesElement.addEventListener("focus", this._didFocus.bind(this));
     this.messagesElement.addEventListener("blur", this._didBlur.bind(this));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to