Skip to content

fix(TextInput): Omit role and remove tabindex so both are handled natively#1108

Merged
ykelkar-eightfold merged 4 commits intoEightfoldAI:mainfrom
ykelkar-eightfold:ykelkar/a11y-follow-up
Mar 23, 2026
Merged

fix(TextInput): Omit role and remove tabindex so both are handled natively#1108
ykelkar-eightfold merged 4 commits intoEightfoldAI:mainfrom
ykelkar-eightfold:ykelkar/a11y-follow-up

Conversation

@ykelkar-eightfold
Copy link
Contributor

@ykelkar-eightfold ykelkar-eightfold commented Mar 23, 2026

SUMMARY:

Omit role and remove tabindex so both are handled natively. It is redundant to set role and tabindex since <input> will handle them out of the box. If the <input> is of type=number, then role="spinbutton" will be applied. Otherwise, role="textbox" will be applied.

GITHUB ISSUE (Open Source Contributors)

JIRA TASK (Eightfold Employees Only):

https://eightfoldai.atlassian.net/browse/ENG-163013

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:

Observe that role and tabindex are not seen in the html, but role is set properly in the Accessibility tab:

Default

image

Type Number

image

Verified in PCSX as well (after removing explicit setting of role):
image

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 23, 2026

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.

@ykelkar-eightfold ykelkar-eightfold marked this pull request as ready for review March 23, 2026 18:34
Copy link
Contributor

@kheinrich-eightfold kheinrich-eightfold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, see minor feedback

@ykelkar-eightfold ykelkar-eightfold merged commit 4311894 into EightfoldAI:main Mar 23, 2026
3 checks passed
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