Closed Bug 1438912 Opened 6 years ago Closed 6 years ago

[VirtualizedTree] Do not allow navigation to next node on ArrowRight key, only allow expand on expandable node.

Categories

(DevTools :: Shared Components, defect)

defect
Not set
normal

Tracking

(firefox61 verified)

VERIFIED FIXED
Firefox 61
Tracking Status
firefox61 --- verified

People

(Reporter: cfat, Assigned: yzen)

References

()

Details

Attachments

(2 files, 2 obsolete files)

Attached image right arrow.gif
[Affected versions]:
- Nightly 60.0a1 (2018-02-15) try build 

[Affected Platforms]:
- All Windows
- All Mac
- All Linux

[Prerequisites]:
- Have the latest try build 60.0a1 from (2018-02-15) installed.
- Accessibility tab is enabled and focused.

[Steps to reproduce]:
1. Click on the first line from the "Properties" panel.
2. Press the "Right arrow" key twice and observe what happens next.

[Expected Results]:
- Nothing happens, the "Right arrow" key is not used to navigate through lines.

[Actual results]:
- Next line is selected.

[Notes]:
- After navigating through all lines from the panel, the user is able to press only one time the key in order to continue the navigation.  
- This is not reproducible on the "Role" and "Name" panel.
- Attached a screen recording with the issue.
Summary: The lines from the "Properties" panel can wrongly be navigates by using the "Right arrow" key → [Accessibility tool] The lines from the "Properties" panel can wrongly be navigates by using the "Right arrow" key
Component: Developer Tools → Developer Tools: Accessibility Tools
Component: Developer Tools: Accessibility Tools → Developer Tools: Shared Components
Summary: [Accessibility tool] The lines from the "Properties" panel can wrongly be navigates by using the "Right arrow" key → [VirtualizedTree] Do not allow navigation to next node on ArrowRight key, only allow expand on expandable node.
Assignee: nobody → yzenevich
Status: NEW → ASSIGNED
Attached patch 1438912 patch (obsolete) — Splinter Review
Attachment #8953598 - Flags: review?(nchevobbe)
Isn't it something we could keep ?
I think it was done because the Tree is used in the Memory panel, where you can have a lot of nested elements.
So you can explore the Tree quite easily by only hitting one key (this is also what perf-html does).
Without it, you need to play with <kbd>↓</kbd> and <kbd>→</kbd>, which can be a bit cumbersome.
Note: I'm working on a patch for perf where the right arrow key will both expand and move in one key (while at the moment we need 2 key events).
(In reply to Julien Wajsberg [:julienw] from comment #3)
> Note: I'm working on a patch for perf where the right arrow key will both
> expand and move in one key (while at the moment we need 2 key events).

Please don't do that. Screen readers announce the changed state from collapsed to expanded, and if this is followed by an immediate focus event, that announcement will be nuked by the stuff that gets spoken with the focus event. Also, this is unlike any other tree control I've ever seen and will introduce more confusion than actual benefits.

I can compromise on keeping the RightArrow behavior for navigating to the next node. I just tested again with native Windows controls like in Windows Explorer, and it behaves a bit inconsistently. E. g. it moves down into the children upon an expanded node, but if the node is non-expandable, RightArrow doesn't do anything. But what it NEVER does is change the focus and expand items at the same time.
> Please don't do that. Screen readers announce the changed state from collapsed to expanded, and if this is followed by an immediate focus event, that announcement will be nuked by the stuff that gets spoken with the focus event. Also, this is unlike any other tree control I've ever seen and will introduce more confusion than actual benefits.

In that patch we do a lot more than just this actually, also expanding until the first "branch". I believe this can be very useful for sighted users, but I understand how it can be a problem for users of assistance technology. Please follow along in [1] for perf.html and let's focus on devtools' tree here.

[1] https://github.com/devtools-html/perf.html/issues/517
It feels like something to good to have to be configurable. Would perhaps having those key event handler behaviors exposed through props with the default one being "do not move on right just expand if expandable" be a good compromise?
SGTM.
Attached patch 1438912 patch v2 (obsolete) — Splinter Review
Attachment #8953598 - Attachment is obsolete: true
Attachment #8953598 - Flags: review?(nchevobbe)
Attachment #8955258 - Flags: review?(nchevobbe)
Comment on attachment 8955258 [details] [diff] [review]
1438912 patch v2

Review of attachment 8955258 [details] [diff] [review]:
-----------------------------------------------------------------

Could we be more explicit about what's going on with left and right arrow keys ?
I think it would be a simpler move (and one that does not change current usage) to have a `preventNavigationOnArrowLeftRight` prop, that we would check before doing the actual `focusParentNode`/`focusNextNode` calls.

What do you think ?
Attachment #8955258 - Flags: review?(nchevobbe)
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #9)
> Comment on attachment 8955258 [details] [diff] [review]
> 1438912 patch v2
> 
> Review of attachment 8955258 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Could we be more explicit about what's going on with left and right arrow
> keys ?
> I think it would be a simpler move (and one that does not change current
> usage) to have a `preventNavigationOnArrowLeftRight` prop, that we would
> check before doing the actual `focusParentNode`/`focusNextNode` calls.
> 
> What do you think ?

I think this still does not resolve the fact that the default behavior would remain the same (and thus confusing for keyboard/screen reader users). I think the idea of that prop (instead of override is fine, as long as we can settle on what default value is, I would vote for it to be true by default.
Flags: needinfo?(nchevobbe)
Yes, I agree to make it default.
The only thing is to set it to false in performance and memory panel
Flags: needinfo?(nchevobbe)
Attached patch 1438912 patch v3Splinter Review
I realized that we do want navigate to parent on arrow left so this is specific to navigate to next node (arrow right) only.
Attachment #8955258 - Attachment is obsolete: true
Attachment #8957309 - Flags: review?(nchevobbe)
Comment on attachment 8957309 [details] [diff] [review]
1438912 patch v3

Review of attachment 8957309 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. Thanks Yura
Attachment #8957309 - Flags: review?(nchevobbe) → review+
Pushed by yura.zenevich@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/af023ff0275b
by default, do not navigate to next node on ArrowRight key. r=nchevobbe
Backout by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4c68b341cf14
Backed out changeset af023ff0275b for merge conflicts on a CLOSED TREE
Backout by ebalazs@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/d54b35a3194d
Backed out changeset af023ff0275b for merge conflicts
Pushed by yura.zenevich@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/adcccd4e15f8
by default, do not navigate to next node on ArrowRight key. r=nchevobbe
https://hg.mozilla.org/mozilla-central/rev/adcccd4e15f8
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
On the latest Firefox Nightly (Build ID: 20180426220144) the issue cannot be reproduced on Mac OS X 10.12, Windows 10 x64 and Ubuntu 16.04 x64, thus I will close the issue as VERIFIED FIXED.
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: