Change Proposal: Add an accessible error state to NumberInput for other components to react to

Open
#278 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
typescript

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.

Description

needs-triage

What is being proposed?

As picked up by Atlas #143, 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.

Dominant language
TypeScript
Stars
8
Forks
3
Avg merge
2d 6h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiamondLightSource/sci-react-ui

All issues in DiamondLightSource/sci-react-ui

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.