Skip to content
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

[core] fix(NumericInput): don't apply textbox role #5420

Merged
merged 6 commits into from
Jul 11, 2022

Conversation

bvandercar-vt
Copy link
Contributor

@bvandercar-vt bvandercar-vt commented Jul 8, 2022

Fixes #0000

Checklist

  • [N/A] Includes tests
  • [N/A] Update documentation

Changes proposed in this pull request:

update the type prop for the <input> element created in a numericInput. role prop no longer needed due to given type

{...inputGroupHtmlProps}
aria-valuemax={this.props.max}
aria-valuemin={this.props.min}
aria-valuenow={valueAsNumber}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Realized that these are probably not needed due to the fact that the <input> already has min and max props, and a value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any documentation for this? Would it hurt to leave them in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it hurts, just unneccessary

Copy link
Contributor

Choose a reason for hiding this comment

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

Does the browser read min/max attributes when the input type is "text"? I feel like they could potentially be useful there... but again, I don't have specific documentation to support this idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is a very good point actually. We should probably keep these since the type is "text".

@bvandercar-vt bvandercar-vt changed the title update numericInput type remove unnecessary aria props on NumericInput Jul 8, 2022
@bvandercar-vt bvandercar-vt changed the title remove unnecessary aria props on NumericInput apply spinbutton role to NumericInput Jul 8, 2022
@adidahiya adidahiya changed the title apply spinbutton role to NumericInput [core] fix(NumericInput): don't apply textbox role Jul 11, 2022
@adidahiya adidahiya merged commit 90e46a6 into palantir:develop Jul 11, 2022
@bvandercar-vt bvandercar-vt deleted the bv/numericInput-a11y branch November 7, 2024 19:50
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.

3 participants