Skip to content

Conversation

@ssherigar-c-eightfold
Copy link

@ssherigar-c-eightfold ssherigar-c-eightfold commented Nov 7, 2025

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:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 7, 2025

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.

Comment on lines 247 to 249
const firstInput = sectionElement.querySelector(
'input, textarea, select, [tabindex="0"]'
) as HTMLElement;
Copy link
Collaborator

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

}, 100);
};

window.addEventListener('scroll', handleScroll);
Copy link
Collaborator

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,
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants