jfx
jfx copied to clipboard
8313138: Scrollbar Keyboard enhancement
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
- Alexander Zuev (@azuev-java - Author) 🔄 Re-review required (review applies to 5bae5e7a)
- Ambarish Rapte (@arapte - Reviewer)
- Kevin Rushforth (@kevinrushforth - Reviewer)
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
: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.
@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.
Webrevs
- 07: Full - Incremental (5ec3c27e)
- 06: Full - Incremental (eeaa8d91)
- 05: Full - Incremental (859f7bbd)
- 04: Full - Incremental (5bae5e7a)
- 03: Full - Incremental (05809ca3)
- 02: Full - Incremental (e2f5345e)
- 01: Full - Incremental (b306d8cc)
- 00: Full (80e70644)
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 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).
@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.
@azuev-java could you please take a look at this from accessibility perspective?
@azuev-java does the choice of key combination make sense?
A couple questions about this:
- 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.
- What do other apps or toolkits provide for horizontal / vertical scrolling?
-
Vertical scrolling is not addressed in this PR (the ticket is about horizontal scrolling). I suppose the existing selection/navigation key bindings are sufficient.
-
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.
@aghaisas and @arapte could you also review this please?
@azuev-java please review
@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.
What about the GridView
? It also uses the VirtualFlow
.
Should it also support this kind of scrolling?
What about the
GridView
What's a GridView? ControlsFX is not a part of OpenJFX...
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.
... but nothing should prevent the maintainers of ControlsFx from adding this functionality to the GridView.
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.
Tested a few samples. It looks good. I need sometime (a day or two) to complete code review.
As a follow-up enhancement, we might consider extending this to TextArea and/or ScrollPane.
/integrate
Going to push as commit b685db23f07df32a3caea7af36206c48b52bb6eb.
@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.