Changeset 256652 in webkit


Ignore:
Timestamp:
Feb 14, 2020 3:18:34 PM (4 years ago)
Author:
Nikita Vasilyev
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.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r256647 r256652  
     12020-02-14  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: VoiceOver doesn't read selected panel tab
     4        https://bugs.webkit.org/show_bug.cgi?id=207735
     5        <rdar://problem/59445157>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        * UserInterface/Views/NavigationBar.js:
     10        (WI.NavigationBar):
     11        (WI.NavigationBar.prototype._mouseDown):
     12        (WI.NavigationBar.prototype._mouseUp):
     13        Navigation bar itself shouldn't receive focus - its items should.
     14
     15        * UserInterface/Views/RadioButtonNavigationItem.js:
     16        (WI.RadioButtonNavigationItem):
     17        "tab" was passed as a label by mistake. VoiceOver read every tab as "tab" instead of it's actual label.
     18
     19        (WI.RadioButtonNavigationItem.prototype.set selected):
     20        When clicking on a tab, focus on it so VoiceOver could read it.
     21
    1222020-02-14  Nikita Vasilyev  <nvasilyev@apple.com>
    223
  • trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js

    r256086 r256652  
    3131
    3232        this.element.classList.add(this.constructor.StyleClassName || "navigation-bar");
    33         this.element.tabIndex = 0;
    3433
    3534        if (role)
     
    313312        document.addEventListener("mouseup", this._mouseUpEventListener, false);
    314313
    315         event.preventDefault();
    316314        event.stopPropagation();
    317315    }
     
    363361        document.removeEventListener("mouseup", this._mouseUpEventListener, false);
    364362
    365         // Restore the tabIndex so the navigation bar can be in the keyboard tab loop.
    366         this.element.tabIndex = 0;
    367 
    368363        // Dispatch the selected event here since the selectedNavigationItem setter surpresses it
    369364        // while the mouse is down to prevent sending it while scrubbing the bar.
  • trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js

    r249118 r256652  
    2828    constructor(identifier, toolTip, image, imageWidth, imageHeight)
    2929    {
    30         super(identifier, toolTip, image, imageWidth, imageHeight, null, "tab");
     30        super(identifier, toolTip, image, imageWidth, imageHeight, "tab");
    3131    }
    3232
     
    4343            this.element.classList.add(WI.RadioButtonNavigationItem.SelectedStyleClassName);
    4444            this.element.setAttribute("aria-selected", "true");
     45            this.element.tabIndex = 0;
    4546        } else {
    4647            this.element.classList.remove(WI.RadioButtonNavigationItem.SelectedStyleClassName);
    4748            this.element.setAttribute("aria-selected", "false");
     49            this.element.tabIndex = -1;
    4850        }
    4951    }
Note: See TracChangeset for help on using the changeset viewer.