Title: [256652] trunk/Source/WebInspectorUI
Revision
256652
Author
nvasil...@apple.com
Date
2020-02-14 15:18:34 -0800 (Fri, 14 Feb 2020)

Log Message

Web Inspector: VoiceOver doesn't read selected panel tab
https://bugs.webkit.org/show_bug.cgi?id=207735
<rdar://problem/59445157>

Reviewed by Timothy Hatcher.

* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar):
(WI.NavigationBar.prototype._mouseDown):
(WI.NavigationBar.prototype._mouseUp):
Navigation bar itself shouldn't receive focus - its items should.

* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem):
"tab" was passed as a label by mistake. VoiceOver read every tab as "tab" instead of it's actual label.

(WI.RadioButtonNavigationItem.prototype.set selected):
When clicking on a tab, focus on it so VoiceOver could read it.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (256651 => 256652)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-02-14 23:17:39 UTC (rev 256651)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-02-14 23:18:34 UTC (rev 256652)
@@ -1,5 +1,26 @@
 2020-02-14  Nikita Vasilyev  <nvasil...@apple.com>
 
+        Web Inspector: VoiceOver doesn't read selected panel tab
+        https://bugs.webkit.org/show_bug.cgi?id=207735
+        <rdar://problem/59445157>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/NavigationBar.js:
+        (WI.NavigationBar):
+        (WI.NavigationBar.prototype._mouseDown):
+        (WI.NavigationBar.prototype._mouseUp):
+        Navigation bar itself shouldn't receive focus - its items should.
+
+        * UserInterface/Views/RadioButtonNavigationItem.js:
+        (WI.RadioButtonNavigationItem):
+        "tab" was passed as a label by mistake. VoiceOver read every tab as "tab" instead of it's actual label.
+
+        (WI.RadioButtonNavigationItem.prototype.set selected):
+        When clicking on a tab, focus on it so VoiceOver could read it.
+
+2020-02-14  Nikita Vasilyev  <nvasil...@apple.com>
+
         Web Inspector: Bezier editor popover should be strictly LTR
         https://bugs.webkit.org/show_bug.cgi?id=206968
         <rdar://problem/59007065>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js (256651 => 256652)


--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js	2020-02-14 23:17:39 UTC (rev 256651)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js	2020-02-14 23:18:34 UTC (rev 256652)
@@ -30,7 +30,6 @@
         super(element);
 
         this.element.classList.add(this.constructor.StyleClassName || "navigation-bar");
-        this.element.tabIndex = 0;
 
         if (role)
             this.element.setAttribute("role", role);
@@ -312,7 +311,6 @@
         document.addEventListener("mousemove", this._mouseMovedEventListener, false);
         document.addEventListener("mouseup", this._mouseUpEventListener, false);
 
-        event.preventDefault();
         event.stopPropagation();
     }
 
@@ -362,9 +360,6 @@
         document.removeEventListener("mousemove", this._mouseMovedEventListener, false);
         document.removeEventListener("mouseup", this._mouseUpEventListener, false);
 
-        // Restore the tabIndex so the navigation bar can be in the keyboard tab loop.
-        this.element.tabIndex = 0;
-
         // Dispatch the selected event here since the selectedNavigationItem setter surpresses it
         // while the mouse is down to prevent sending it while scrubbing the bar.
         if (this._previousSelectedNavigationItem !== this.selectedNavigationItem)

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js (256651 => 256652)


--- trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js	2020-02-14 23:17:39 UTC (rev 256651)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js	2020-02-14 23:18:34 UTC (rev 256652)
@@ -27,7 +27,7 @@
 {
     constructor(identifier, toolTip, image, imageWidth, imageHeight)
     {
-        super(identifier, toolTip, image, imageWidth, imageHeight, null, "tab");
+        super(identifier, toolTip, image, imageWidth, imageHeight, "tab");
     }
 
     // Public
@@ -42,9 +42,11 @@
         if (flag) {
             this.element.classList.add(WI.RadioButtonNavigationItem.SelectedStyleClassName);
             this.element.setAttribute("aria-selected", "true");
+            this.element.tabIndex = 0;
         } else {
             this.element.classList.remove(WI.RadioButtonNavigationItem.SelectedStyleClassName);
             this.element.setAttribute("aria-selected", "false");
+            this.element.tabIndex = -1;
         }
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to