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
- Check out branch
rkaraivanov/fix-17556.
- 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>
- Run the sample.
- Click Required on. The input gets
aria-required="true".
- Click Required off.
- 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
Description
With Signal Forms and a conditional
requiredrule, turning the rule off removes the asterisk, but the input keepsaria-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
rkaraivanov/fix-17556.aria-required="true".Actual Result
The asterisk is gone, but the input still has
aria-required="true". It changes tofalseonly after the input is focused and blurred.Expected Result
aria-requiredchanges tofalseas soon as the rule turns off.Reproduction URL
#17556
Attachments
No response