<https://webkit.org/b/118106> Web Inspector: AX: Add additional contextual labels...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 01:31:23 +0000 (01:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 01:31:23 +0000 (01:31 +0000)
Patch by James Craig <james@cookiecrook.com> on 2013-08-19
Reviewed by Joseph Pecoraro.

Changed general console "Output" string to more specific "Error", "Warning", etc for accessibility.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ConsoleCommandResult.js:
* UserInterface/ConsoleMessageImpl.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154310 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/ConsoleCommandResult.js
Source/WebInspectorUI/UserInterface/ConsoleMessageImpl.js

index 91284e0e0e95b641e2ef821d38f1dca970742974..54231944732c3501a035d6d6a3a60f9267b7d499 100644 (file)
@@ -1,3 +1,15 @@
+2013-08-19  James Craig  <james@cookiecrook.com>
+
+        <https://webkit.org/b/118106> Web Inspector: AX: Add additional contextual labels for Error/Warnings/Logs that will be spoken for screen readers
+
+        Reviewed by Joseph Pecoraro.
+
+        Changed general console "Output" string to more specific "Error", "Warning", etc for accessibility.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/ConsoleCommandResult.js:
+        * UserInterface/ConsoleMessageImpl.js:
+
 2013-08-16  James Craig  <james@cookiecrook.com>
 
         <https://webkit.org/b/118105> Web Inspector: AX: Add support for ARIA tablists/tabs to inspector tabs
index dfd08744e291ff2ecec2317283cf40c197c7966f..dc681e6df1cc7ed58a70d0ee52cfbf5fd9b7ebed 100644 (file)
Binary files a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js and b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js differ
index 4f08a563cc33e03540eef9273e7880d7767ee3ce..8ce0ed25aa0cc766b6ef43b736bab04f09f95a11 100644 (file)
@@ -46,7 +46,8 @@ WebInspector.ConsoleCommandResult.prototype = {
     {
         var element = WebInspector.ConsoleMessageImpl.prototype.toMessageElement.call(this);
         element.classList.add("console-user-command-result");
-        element.setAttribute("data-labelprefix", WebInspector.UIString("Output: "));
+        if (!element.getAttribute("data-labelprefix")) 
+            element.setAttribute("data-labelprefix", WebInspector.UIString("Output: "));
         return element;
     },
 
index 609d9115e6409f9c7d04b0fe70fb912c7ae2fb27..4847f7175bafee618ec9173e06542bcc3da68025 100644 (file)
@@ -483,18 +483,23 @@ WebInspector.ConsoleMessageImpl.prototype = {
         switch (this.level) {
             case WebInspector.ConsoleMessage.MessageLevel.Tip:
                 element.classList.add("console-tip-level");
+                element.setAttribute("data-labelprefix", WebInspector.UIString("Tip: "));
                 break;
             case WebInspector.ConsoleMessage.MessageLevel.Log:
                 element.classList.add("console-log-level");
+                element.setAttribute("data-labelprefix", WebInspector.UIString("Log: "));
                 break;
             case WebInspector.ConsoleMessage.MessageLevel.Debug:
                 element.classList.add("console-debug-level");
+                element.setAttribute("data-labelprefix", WebInspector.UIString("Debug: "));
                 break;
             case WebInspector.ConsoleMessage.MessageLevel.Warning:
                 element.classList.add("console-warning-level");
+                element.setAttribute("data-labelprefix", WebInspector.UIString("Warning: "));
                 break;
             case WebInspector.ConsoleMessage.MessageLevel.Error:
                 element.classList.add("console-error-level");
+                element.setAttribute("data-labelprefix", WebInspector.UIString("Error: "));
                 break;
         }