primefaces / primefaces/primereact
InputNumber: The 'max' attribute is not allowed for this input 'type'
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
The InputNumber component fails accessibility requirements, when a max range is provided. The input element with type="text" should not have max attribute.
Not sure if this is fixable without some bigger adjustments, as from what I can see this component is based on the text input.
Reproducer
No response
System Information
primereact: 10.9.7
Steps to reproduce the behavior
- Go to https://primereact.org/inputnumber/
- Inspect the input element with max value defined
- Notice that the input has
type="text"andmaxattribute
Expected behavior
Input should be of a different type e.g. number or the max attribute should not be defined on the element.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the InputNumber component as demonstrated on the inputnumber documentation page, and inspect the rendered input when a max value is provided. Confirm the resulting element satisfies the reported accessibility requirement by using an appropriate input type or omitting the invalid max attribute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100