Skip to content

[Input Group] aria-required stays true after a conditional required rule turns off #17620

Description

@viktorkombov

Description

With Signal Forms and a conditional required rule, turning the rule off removes the asterisk, but the input keeps aria-required="true" until it is blurred. Screen readers still announce the field as required. Found in #17556, which adds the Signal Forms support.

Framework

Angular

Angular Version

22.1.x

Ignite UI for Angular Version

22.2.x (PR #17556)

Component / Area

Input Group

Browser

Chrome

Operating System

Windows

Command Not Working

No response

Steps to Reproduce

  1. Check out branch rkaraivanov/fix-17556.
  2. Add the following to a dev sample:
public needed = signal(false);
public model = signal({ name: 'Bobby' });
public f = form(this.model, p => required(p.name, { when: () => this.needed() }));
<igx-input-group>
    <input igxInput [formField]="f.name" />
</igx-input-group>
<button (click)="needed.set(true)">Required on</button>
<button (click)="needed.set(false)">Required off</button>
  1. Run the sample.
  2. Click Required on. The input gets aria-required="true".
  3. Click Required off.
  4. Inspect the input without focusing it.

Actual Result

The asterisk is gone, but the input still has aria-required="true". It changes to false only after the input is focused and blurred.

Expected Result

aria-required changes to false as soon as the rule turns off.

Reproduction URL

#17556

Attachments

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugAny issue that describes a bug✅ status: resolvedApplies to issues that have pending PRs resolving them, or PRs that have already merged.input-groupversion: 22.2.x

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions