DiamondLightSource / DiamondLightSource/sci-react-ui
Change Proposal: Add an accessible error state to NumberInput for other components to react to
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 3
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 5
Description
## What is being proposed?
As picked up by [Atlas #143](https://github.com/DiamondLightSource/atlas/pull/143#issuecomment-5207977415), the `NumberInput` currently shows user-entered invalid values, but does not commit them. As such, any form populated and used for further action may use outdated values.
## Why is this needed?
Current behaviour of components which act on inputs from `NumberInput` is unpredictable for the user, as invalid values are shown as true to a user, but not committed. This could be tracked by an accessible error state which other components can use to disable on an invalid entry.
## What will change?
Depending on implementation methods, this may change component interface, behaviour of committing an invalid value, etc.
## Interface changes (if any)
Potentially, but undetermined.
## Breaking change?
- [ ] Yes
- [ ] No
## Next steps
A maintainer will review this issue.
If accepted, it will be marked as `accepted` and a PR may then be opened.
Contributor guide
Research direction
Start by inspecting the NumberInput component and its current handling of invalid user-entered values. Define how an accessible error state should be exposed and how other components can react to it; the issue does not identify tests or a settled interface, so completion criteria require maintainer agreement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100