Invalid state for number field

Hello, sorry for disturbing. Currently there is no way I could achieve error(invalid) state without providing actual message (string), however shopify/polaris was providing us with such opportunity.
Imagine I have something like this:

<s-number-field

        value={String(value)}

        min={min}

        max={max}

        suffix={suffix}

        prefix={prefix}

        label={label}

        labelAccessibilityVisibility={labelAccessibilityVisibility}

        details={details}

        disabled={disabled}

        error={error ? "" : undefined}

        id={id}

        placeholder={placeholder}

        readOnly={readOnly}

        onInput={handleInput}

        onBlur={handleBlur}

/>

passing an empty string or true (boolean) I am expecting number field to be in error(invalid) state without having message beneath. Right now it looks like there is no way to get in that state without providing an actual string which is annoying.

3 Likes

Same issue for me… :frowning:

It’s required to provide text because that’s a foundational requirement for accessibility. See Understanding Success Criterion 3.3.1: Error Identification | WAI | W3C