-
Notifications
You must be signed in to change notification settings - Fork 97
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: listbox elements #2570
feat: listbox elements #2570
Conversation
🦋 Changeset detectedLatest commit: bd10aed The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Do not merge until ready
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@nikkimk Chip is looking good! Here are a couple notes--the first of which we chatted about:
|
what a boost to come back from vacation and see such a ferment of activity in this branch. looking forward to diving in to the details |
@hellogreg ptal on chip. Also feel free to look at all of select. |
The issues look fixed with chip! Two questions:
|
At the demo page, I'm unable to navigate options with the arrow keys (Mac Chrome/Safari/Firefox). I can expand and collapse the list, but the arrows just scroll the page, as shown below: https://drive.google.com/file/d/1La1Quwv-SAcmxCh1HEbhdnkJ9VRav5Mo/view?usp=drive_link In multiselect and typeahead, I can click in the list with the mouse and then use the arrows, with mixed results (only lets me travel between a few options). |
@hellogreg this should be fixed now. I had added logic for "create option", but it kept adding options that reset roving tabindex. I just pushed an update that will prevent this. |
I can navigate the Select options with all the arrows now (cool!), but I have to tab into them first. I can't just open the list and start using arrows (nor can I open the list with the down arrow, if you want users to have that option). In other words, here's what I expect (assuming we're going for keyboard behavior like the WAI Select-only pattern):
And here's what I have to do:
|
@hellogreg thanks much for the feedback. I just uploaded a fix for that. Check it out. |
Nice. Arrows are working. One more thing (because there's always one more thing): after a selection is made with arrows, pressing space or return doesn't currently set the value, close the box, and return focus to the closed box. |
@hellogreg tag: you're it. I think I fixed it. |
Confirmed that Single, Option, and Grouped option variants all work via keyboard! Should the Multi-select, Typeahead, and Filtering variants be ready for testing, too? I was still having some issues selecting or typing in those. We can chat about them (and I can demo) when we meet later. Getting close. |
@hellogreg try it now |
Thanks! Basically, everything does now work: items in each variant can be successfully selected! Here are the (smaller) keyboard-only issues I've noticed.
|
…fly-elements into menu-dropdown-listbox
…fly-elements into menu-dropdown-listbox
This is a staging branch for dropdown, menu, and select.
What I did
roving-tabindex-controller
and fixed an issue with the controller stealing focus when items were updated.listbox-controller
.toggle-controller
.pf-select
,pf-select-listbox
,pf-select-group
, andpf-select-option
.pf-chip
andpf-chip-group
.pf-dropdown
,pf-dropdown-menu
,pf-dropdown-group
, andpf-dropdown-item
.close-label
in favore ofaccessible-close-label
.Testing Instructions
View the following docs, and check out all the examples:
close-label
deprecationNotes to Reviewers
roving-tabindex-controller
The controller's
updateItems
function was stealing focus every time it was called. This function was meant to update the controller's list of focusable items as items were added or removed from the host. Since not all updates require focus, the controller will now only re-set focus if the controller had focus in the first place.Upstream Patternfly
Due to the number of accessibility improvements to Patternfly's current release (v5), these components are based on their v5 counterparts instead of earlier versions. There are also additional changes to improve accessibility in these components.
Chip
Upstream Patternfly's
Select
has options that use upstream Patternfly'sChip
so I had to also do 1-1 forpf-chip
in order to provide those options inpf-select
.Dropdown
See the following references for components with
role="menu"
:Dropdown
Select
Components with
role=listbox
can be used as standalone elements, as part of a combobox. See the following references:Select