-
Notifications
You must be signed in to change notification settings - Fork 63
ENG-162487: accessibility fix for stepper component to move the focus to the selected section #1046
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
base: main
Are you sure you want to change the base?
ENG-162487: accessibility fix for stepper component to move the focus to the selected section #1046
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
src/components/Stepper/Stepper.tsx
Outdated
| const firstInput = sectionElement.querySelector( | ||
| 'input, textarea, select, [tabindex="0"]' | ||
| ) as HTMLElement; |
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.
please use ref to select elements
src/components/Stepper/Stepper.tsx
Outdated
| }, 100); | ||
| }; | ||
|
|
||
| window.addEventListener('scroll', handleScroll); |
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.
remove on unmount as well
| locale = enUS, | ||
| onChange, | ||
| readonly = true, | ||
| sectionRefs, |
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.
this prop is not user friendly, please find a different option
… selected section
SUMMARY:
ENG-162487:
Links should direct keyboard users to the relevant form section by either linking to the section heading or setting focus on the first input field.
Solution:
When the Enter or Space key is pressed on a link, the page smoothly scrolls to the corresponding form section and automatically sets focus on the first input field, enabling immediate keyboard interaction
GITHUB ISSUE (Open Source Contributors)
NA
JIRA TASK (Eightfold Employees Only):
https://eightfoldai.atlassian.net/browse/ENG-162487
CHANGE TYPE:
TEST COVERAGE:
TEST PLAN:
Navigate to TA Home → My Positions → Create Position → Create from Scratch → Select Template
Try to fill the form using keyboard for different section
Expected Result:
When a keyboard user activates a link using the Enter or Space key, the page scrolls smoothly to the targeted form section, and the first input field in that section receives focus, allowing the user to start interacting with the form immediately without additional navigation
Screen.Recording.2025-11-11.at.1.22.17.PM.mov