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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/core/src/components/forms/numericInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,13 @@ export class NumericInput extends AbstractPureComponent2<HTMLInputProps & Numeri
private renderInput() {
const inputGroupHtmlProps = removeNonHTMLProps(this.props, NON_HTML_PROPS, true);
const valueAsNumber = this.getCurrentValueAsNumber();
const hasSpinButtons = this.props.buttonPosition !== undefined && this.props.buttonPosition !== "none";

return (
<InputGroup
asyncControl={this.props.asyncControl}
autoComplete="off"
id={this.numericInputId}
role={hasSpinButtons ? "spinbutton" : "textbox"}
role={this.props.allowNumericCharactersOnly ? "spinbutton" : undefined}
{...inputGroupHtmlProps}
aria-valuemax={this.props.max}
aria-valuemin={this.props.min}
Expand Down