Repository navigation
fix(picker-column): focus options in setFocus - #31797
Open
adityajai119 wants to merge 1 commit into
Open
adityajai119 wants to merge 1 commit into
adityajai119 wants to merge 1 commit into
Conversation
ionic-team#30563 removed the separate assistiveFocusable element and moved the slider role and keyboard handling onto scrollEl (.picker-opts), but left setFocus() and the scroll aria-valuetext update reading assistiveFocusable. Point both at scrollEl and remove the unused field so setFocus() focuses the column and enters keyboard input mode again. resolves ionic-team#30634
|
@adityajai119 is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue number: resolves #30634
What is the current behavior?
Since 8.7.4 (#30563), calling
setFocus()onion-picker-columndoes nothing, and scrolling a picker column no longer updatesaria-valuetexton the slider element while dragging.#30563 removed the separate
.assistive-focusableelement and movedrole="slider",tabindex,aria-valuetext, and keyboard handling ontoscrollEl(.picker-opts), butsetFocus()and the scrollaria-valuetextcallback still readthis.assistiveFocusable, which is never assigned.What is the new behavior?
setFocus()focusesthis.scrollElso callingcolumn.setFocus()focuses the column and enters keyboard input mode onnumericInputcolumns again.aria-valuetextonscrollEl, and the unusedassistiveFocusablefield is removed.picker-column.spec.tsxforsetFocus()and the livearia-valuetextscroll update, and restoredsetFocus()in thepickerkeyboard-entry e2e tests.Does this introduce a breaking change?
Other information
Tests run locally on Windows:
npm run test.spec -- --ci: 105 suites, 914 tests pass. Both newpicker-column.spec.tsxtests fail onmain(Expected number of calls: 1, Received: 0andExpected: "Second", Received: "First") and pass with this change.npx playwright test src/components/picker/test/keyboard-entry/picker.e2e.ts src/components/picker/test/a11y/picker.e2e.ts src/components/picker-column/test/basic/picker-column.e2e.ts --project="Mobile Chrome": all tests pass. Onmain, thepickerkeyboard-entry tests usingsetFocus()fail (Expected: focused, Received: inactiveandevent "ionChange" was not received).npm run lint(ESLint, Stylelint, Prettier) andnpm run buildpass cleanly.AI-assisted: drafted with an AI coding agent; the tests above were run locally.