Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Accessibility] Using arrow keys to navigate in toolbars items #15021

Merged
merged 79 commits into from
Nov 20, 2023

Conversation

brichet
Copy link
Contributor

@brichet brichet commented Aug 25, 2023

This PR allows to use the arrow keys to navigate in toolbars items.

video.mp4

The toolbars use a toolkit based on web components. This is a (first ?) step of jupyterlab/frontends-team-compass#143.

Reference

About accessibility:

About web components:

Code changes

Make use of the web component from jupyter-ui-toolkit to build the toolbars and the toolbar items.

User-facing changes

EDIT:
The layout of the toolbars is not exactly the same as before. Let's wait for ui-tests to see the difference...

  • toolbars are 3 pixels wider, to increase the border width when the items are focused
  • toggled buttons has not the same appearance
not toggled toggled
before
after

Backwards-incompatible changes

The toolbars built from the ui-components package should use the web components items from jupyter-ui-toolkit.

cc. @fcollonval who contributed to this PR

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@brichet
Copy link
Contributor Author

brichet commented Aug 25, 2023

please update snapshots

@github-actions
Copy link
Contributor

Documentation snapshots updated.

@brichet
Copy link
Contributor Author

brichet commented Aug 28, 2023

Bumping the CI

Copy link
Contributor Author

@brichet brichet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the tests, sometime the text in toolbar is not visible.
I had to add rules or to modify the tests for them to pass (see below).

For now I only saw this during the playwright tests.
It may be related to the color: --neutral-foreground-rest; coming from fast-foundation components.
Maybe we should try to understand why/when it occurs and if it has to be fixed.

examples/cell/index.css Outdated Show resolved Hide resolved
examples/notebook/index.css Outdated Show resolved Hide resolved
galata/test/documentation/debugger.test.ts Show resolved Hide resolved
@brichet
Copy link
Contributor Author

brichet commented Sep 6, 2023

please update galata snapshots

brichet and others added 2 commits November 20, 2023 10:05
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @brichet!

We can explore alternatives to the visual changes in this PR in follow-up issues/PR if anyone reading this has strong opinions against the increase in toolbar height/changes to the debugger buttons.

@krassowski krassowski mentioned this pull request Nov 20, 2023
14 tasks
@brichet
Copy link
Contributor Author

brichet commented Nov 20, 2023

Merging as failures are not related

@brichet brichet merged commit 3d525a2 into jupyterlab:main Nov 20, 2023
75 of 77 checks passed
@brichet brichet deleted the toolbar_webcomponent branch November 20, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment