primereact icon indicating copy to clipboard operation
primereact copied to clipboard

InputNumber: The 'max' attribute is not allowed for this input 'type'

Open KubaGorka opened this issue 4 months ago • 0 comments

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

  1. Go to https://primereact.org/inputnumber/
  2. Inspect the input element with max value defined
  3. Notice that the input has type="text" and max attribute

Expected behavior

Input should be of a different type e.g. number or the max attribute should not be defined on the element.

KubaGorka avatar Sep 15 '25 12:09 KubaGorka