Skip to content

[Bug]: multiple properties not working for PinInput #53

@stefandevo

Description

@stefandevo

Prerequisites

  • I have searched existing issues to ensure this bug hasn't been reported already
  • I have tested this with the latest version of the components

Bug description

when setting autoFocus on the PinInput control, focus is not set upon page load.
when setting isRequired on the PinInput control, no * is added to the label.
when setting isInvalid on the PinInput control, no red border, and description is not colored red.

Steps to reproduce

<PinInput isRequired isInvalid autoFocus size="sm">
    <PinInput.Label>Secure code</PinInput.Label>
    <PinInput.Group maxLength={6}>
        <PinInput.Slot index={0} />
        <PinInput.Slot index={1} />
        <PinInput.Slot index={2} />
        <PinInput.Slot index={3} />
        <PinInput.Slot index={4} />
        <PinInput.Slot index={5} />
    </PinInput.Group>
    <PinInput.Description>This is a hint text to help user.</PinInput.Description>
</PinInput>

on a page, loading the page, no autofocus on first element. No isRequired visual style. No isInvalid visual style.

Expected behavior

PinInput gets directly the focus on a page where we place the PinInput on when autofocus set.
isRequired should display * next to label.
isInvalid should color the borders red and the Description red.

Actual behavior

no autofocus, no *, no red border

Accessibility impact

  • This bug affects keyboard navigation
  • This bug affects screen reader users
  • This bug affects focus management
  • This bug affects color contrast or visual accessibility

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions