jfx icon indicating copy to clipboard operation
jfx copied to clipboard

8313138: Scrollbar Keyboard enhancement

Open andy-goryachev-oracle opened this issue 11 months ago • 20 comments

Adding alt-ctrl-LEFT/RIGHT/UP/DOWN (option-command-LEFT/RIGHT/UP/DOWN) key bindings to

  • ListView
  • TreeView
  • TableView
  • TreeTableView

to support keyboard-only horizontal and vertical scrolling. The main reason for the change is to improve accessibility.

NOTE: For controls in right-to-left orientation, the direction of horizontal scrolling is reversed.

As far as I can tell, these key combinations do not interfere with editing.

The proposed solution can be further optimized by adding a public method to the VirtualFlow class, something like

public void horizontalUnitScroll(boolean right);
public void verticalUnitScroll(boolean down);

Q: Does this change require a CSR to explain the change in the controls' behavior? We don't yet have the key bindings documented in /doc-files/behavior

Note: Jenkins headful test passed on all mac configurations, failed on all linux configurations (master branch failed also, so it is test issue), while windows configuration is not yet available.


Progress

  • [x] Change must not contain extraneous whitespace
  • [x] Change requires CSR request JDK-8329336 to be approved
  • [x] Commit message must refer to an issue
  • [x] Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issues

  • JDK-8313138: Scrollbar Keyboard enhancement (Enhancement - P3)
  • JDK-8329336: Scrollbar Keyboard enhancement (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1393/head:pull/1393
$ git checkout pull/1393

Update a local copy of the PR:
$ git checkout pull/1393
$ git pull https://git.openjdk.org/jfx.git pull/1393/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1393

View PR using the GUI difftool:
$ git pr show -t 1393

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1393.diff

Webrev

Link to Webrev Comment

andy-goryachev-oracle avatar Mar 06 '24 19:03 andy-goryachev-oracle

:wave: Welcome back angorya! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Mar 06 '24 19:03 bridgekeeper[bot]

@andy-goryachev-oracle This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8313138: Scrollbar Keyboard enhancement

Reviewed-by: arapte, kcr, kizune

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

openjdk[bot] avatar Mar 13 '24 19:03 openjdk[bot]

Since this is a noticeable (end-user-visible) behavioral change, I think a CSR would be in order (it need not be very detailed).

We don't currently document keyboard shortcuts -- either for individual controls or for focus traversal -- although that would be a good doc enhancement (for a later time).

Reviewers: @arapte @azuev-java

/reviewers 2 /csr needed

kevinrushforth avatar Mar 26 '24 17:03 kevinrushforth

@kevinrushforth The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

openjdk[bot] avatar Mar 26 '24 17:03 openjdk[bot]

@kevinrushforth has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@andy-goryachev-oracle please create a CSR request for issue JDK-8313138 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

openjdk[bot] avatar Mar 26 '24 17:03 openjdk[bot]

@azuev-java could you please take a look at this from accessibility perspective?

andy-goryachev-oracle avatar Apr 08 '24 17:04 andy-goryachev-oracle

@azuev-java does the choice of key combination make sense?

andy-goryachev-oracle avatar Apr 08 '24 18:04 andy-goryachev-oracle

A couple questions about this:

  1. What are the keyboard shortcuts for vertical scrolling? I would expect them to be something like alt-ctrl-UP/DOWN but that doesn't seem to be the case. In fact I don't see a way to even do vertical scrolling (PAGE UP/PAGE DOWN is not the same as vertical scrolling), but maybe I'm missing something.
  2. What do other apps or toolkits provide for horizontal / vertical scrolling?

kevinrushforth avatar Apr 08 '24 22:04 kevinrushforth

  1. Vertical scrolling is not addressed in this PR (the ticket is about horizontal scrolling). I suppose the existing selection/navigation key bindings are sufficient.

  2. In most cases, LEFT/RIGHT arrows; I haven't encountered any special keys for horizontal navigation. We could have used that for ListView case, but it is clearly insufficient for any table-like control. A multi-key chord was therefore selected that a) works for all 4 cases and b) does not interfere with editing.

andy-goryachev-oracle avatar Apr 08 '24 22:04 andy-goryachev-oracle

@aghaisas and @arapte could you also review this please?

andy-goryachev-oracle avatar Apr 22 '24 17:04 andy-goryachev-oracle

@azuev-java please review

victordyakov avatar Apr 29 '24 18:04 victordyakov

@azuev-java does the choice of key combination make sense?

Perfectly fine. When Voice Over is active it will override any defined key combination but with Voice Over we do not really care about the scrolling for better readability - and if there is any element that can be selected with VO cursor it will do scrolling by itself.

azuev-java avatar Apr 30 '24 09:04 azuev-java

What about the GridView? It also uses the VirtualFlow. Should it also support this kind of scrolling?

eduardsdv avatar May 06 '24 18:05 eduardsdv

What about the GridView

What's a GridView? ControlsFX is not a part of OpenJFX...

andy-goryachev-oracle avatar May 06 '24 18:05 andy-goryachev-oracle

What about the GridView

What's a GridView? ControlsFX is not a part of OpenJFX...

Oh, sorry, my mistake. You are right. It is part of the ControlsFX.

eduardsdv avatar May 06 '24 18:05 eduardsdv

... but nothing should prevent the maintainers of ControlsFx from adding this functionality to the GridView.

andy-goryachev-oracle avatar May 06 '24 20:05 andy-goryachev-oracle

As @eduardsdv mentioned in https://github.com/openjdk/jfx/pull/1326#issuecomment-2096666336

and @kevinrushforth asked about earlier, perhaps we should add similar capability for vertical scrolling using alt-ctrl-Up/DOWN (option-command-UP/DOWN) in the same PR rather than separately.

andy-goryachev-oracle avatar May 06 '24 20:05 andy-goryachev-oracle

Tested a few samples. It looks good. I need sometime (a day or two) to complete code review.

arapte avatar May 13 '24 09:05 arapte

As a follow-up enhancement, we might consider extending this to TextArea and/or ScrollPane.

kevinrushforth avatar May 16 '24 19:05 kevinrushforth

/integrate

andy-goryachev-oracle avatar May 22 '24 14:05 andy-goryachev-oracle

Going to push as commit b685db23f07df32a3caea7af36206c48b52bb6eb.

openjdk[bot] avatar May 22 '24 14:05 openjdk[bot]

@andy-goryachev-oracle Pushed as commit b685db23f07df32a3caea7af36206c48b52bb6eb.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar May 22 '24 14:05 openjdk[bot]