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

Incrementer manual input support #317

Merged
merged 2 commits into from
Mar 27, 2019
Merged

Incrementer manual input support #317

merged 2 commits into from
Mar 27, 2019

Conversation

Darrken
Copy link
Collaborator

@Darrken Darrken commented Mar 26, 2019

  • Input type is number, so mobile users will get the numeric keyboard

  • The increment/decrement amounts now respect the thresholds.

  • Using Kent Dodds' preferred (for now?) method of testing useEffect.

  • Switched from lodash's IsNumber to IsFinite, which handles NaN in a falsey way.

@Darrken Darrken requested a review from jrios March 26, 2019 17:47
</ScreenReaderButtonText>
<Icon name="minus" />
</RenderedButton>
<IncrementerTextbox
{...theme.validationInputColor.default}
type="text"
type="number"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add an aria-label to somehow let screen readers know what this incrementer represents? There is no associated label control right now, which I think was a misstep when I first wrote this component.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, I also didn't think to add that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added role="spinbutton" and Home/End shortcut keys as per WAI-ARIA practices. I also updated an example to show it being used with Control and Label.

@jrios jrios merged commit 59c2adb into WTW-IM:master Mar 27, 2019
@Darrken Darrken deleted the incrementer branch April 8, 2019 17:40
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