Skip to content

USWDS - Bug: Prefix/suffix does not use disabled input styling #4913

Description

@patrickcate

Describe the bug

If an input has a prefix/suffix and the input is disabled, the disabled styling does not apply to the prefix/suffix. Disabled inputs have a light gray background, but the prefix/suffix's have a white background.

Steps to reproduce the bug

  1. Create a USWDS input with a prefix, suffix, or both.
  2. Add the disabled attribute to the USWDS input.
  3. The input will have a light gray background, but the prefix/suffix's will have a white background.

Expected Behavior

When an input is disabled, its styling is also applied to any prefix/suffix's on the input.

Related code

<form class="usa-form">
  <label class="usa-label" for="example-input-suffix">Weight, in pounds</label>
  <div class="usa-input-group usa-input-group--sm">
    <input
      id="example-input-suffix"
      class="usa-input"
      pattern="[0-9]*"
      inputmode="numeric"
      disabled
    />
    <div class="usa-input-suffix" aria-hidden="true">lbs.</div>
  </div>
</form>

Screenshots

Screen Shot 2022-08-08 at 11 03 49 AM

System setup

  • USWDS version: 3.0.2
  • Device: Macbook Pro
  • Operating System: OSX 12.4
  • Browser and version: Chrome v103

Additional context

No response

Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions