-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: virtual list item selection #8318
Open
tomivirkki
wants to merge
50
commits into
main
Choose a base branch
from
feat/virtual-list-selection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,491
−22
Open
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
627689b
feat: virtual list item selection
tomivirkki 02e00f0
test: add an integration test
tomivirkki 1287b6c
test: more tests and fixes
tomivirkki 5273a0a
fix: do not try to select undefined items
tomivirkki 9892d7a
cleanup
tomivirkki 374e690
fix: scroll the focused index to view on space
tomivirkki 57f6dfd
refactor: scroll to focused index
tomivirkki 8033ace
feat: add selected in renderer model
tomivirkki 2516e39
feat: aria semantics
tomivirkki e33511e
feat: add itemAccessibleNameGenerator
tomivirkki a549207
fix: remove navigating state on selection mode unset
tomivirkki 734d6e1
refactor: cleanup and test coverage
tomivirkki 3d78d3f
fix: bugfixes
tomivirkki a9fd9b0
refactor: cleanup
tomivirkki 8e7e837
refactor: cleanup
tomivirkki 2acdbf6
fix an issue with single-selection
tomivirkki 26af05c
refactor: change selection mode type
tomivirkki e408af5
refactor: cleanup
tomivirkki a407c4a
refactor: cleanup
tomivirkki 1854b36
fix: do not mark element focused if it does not match focus index
tomivirkki c626bcb
refactor: avoid excess re-renders on click select
tomivirkki 7e2eb5b
fix: do not rerender when tabbing focusable children of same parent
tomivirkki d16de3d
docs: clarify the need for focus exit
tomivirkki 5a9e6f9
refactor: remove theme changes for now
tomivirkki 6c8734a
fix: browser-specific fixes
tomivirkki 33833c7
fix types
tomivirkki 7c5e2ec
refactor: cleanup
tomivirkki 272c046
fix: make sure focused index element gets focused on space select
tomivirkki 2c4dae6
refactor: avoid jumpiness on arrow navigation
tomivirkki 24001d4
chore: clean up dev page
tomivirkki 3fbfd1f
refactor: cleanup and fixes
tomivirkki 19ebae1
docs: document new state attributes
tomivirkki b61a645
fix: mark root element focused in interaction mode
tomivirkki 28ded0e
test: fix a timing issue in an integration test
tomivirkki 275aac1
refactor: cleanup
tomivirkki 993af45
fix: use position absolute for focus-exit to avoid scroll position ch…
tomivirkki a0bc08a
fix: always update focus index on click
tomivirkki c4802cf
refactor: use getter for __isSelectable
tomivirkki a499cbd
fix: do not throw on enter when focus item not rendered
tomivirkki 20854b0
refactor: split out virtual list base mixin
tomivirkki 9b37d4d
refactor __getItemModel
tomivirkki 3a5f2d4
chore: cleanup
tomivirkki bb503ee
refactor: relocate a11y
tomivirkki d67dd5b
Merge remote-tracking branch 'origin/main' into feat/virtual-list-sel…
tomivirkki 3b5bda3
Update packages/virtual-list/src/vaadin-virtual-list-selection-mixin.js
tomivirkki 86b695f
test: add explicit typing tests for undefined
tomivirkki 7901b01
fix: set aria-selected asynchronously
tomivirkki 70dbd70
fix: flush virtualizer on arrow navigation
tomivirkki 46369a8
fix: limit the ariaSelected workaround to single-select only
tomivirkki 16ed88c
only have navigating attribute on keyboard navigation
tomivirkki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading status checks…
refactor: use getter for __isSelectable
commit c4802cf18054d2bc2dc279fd5211279a0a4aa090
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using single selection, when you switch the selection from one item to another one, VoiceOver doesn't announce a selection change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using multi-select it only announces the number of selected items that are currently rendered. So if three selected items are out of view and you select a new one it will announce that only a single item is selected, while there are actually four. Another issue is that scrolling selected items out of view (so that they are removed from DOM) will announce that they have been removed from the selection, which is not the case.
Only tested this with VoiceOver, but I think this is a general issue with how virtual list works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I make VO announce the number of selected items? While navigating, I only saw announcements related to the currently focused item selection state and its position.
Kapture.2024-12-12.at.11.52.15.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It announces the number when changing the selection.
I also just tested with NVDA, which never announces the current selection, neither for single nor multi listboxes. You only get information about the selection state when going through individual items.