Skip to content

Commit 2d70d9f

Browse files
authored
fix(core): set aria-hidden to required marker (#2913)
fix #2887
1 parent 32fac5b commit 2d70d9f

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

src/bootstrap/src/lib/types/checkbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { FieldType } from '@ngx-formly/core';
2626
[class.custom-control-label]="to.formCheck.indexOf('custom') === 0"
2727
>
2828
{{ to.label }}
29-
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
29+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
3030
</label>
3131
</div>
3232
`,

src/bootstrap/src/lib/wrappers/form-field.wrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
77
<div class="form-group" [class.has-error]="showError">
88
<label *ngIf="to.label && to.hideLabel !== true" [attr.for]="id">
99
{{ to.label }}
10-
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
10+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
1111
</label>
1212
1313
<ng-template #fieldComponent></ng-template>

src/ionic/src/lib/wrappers/form-field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
77
<ion-item [lines]="to.itemLines">
88
<ion-label [position]="to.labelPosition">
99
{{ to.label }}
10-
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
10+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
1111
</ion-label>
1212
<ng-template #fieldComponent></ng-template>
1313
</ion-item>

src/kendo/src/lib/types/checkbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { FieldType } from '@ngx-formly/core';
1313
<label [for]="id" class="k-checkbox-label">
1414
<span>
1515
{{ to.label }}
16-
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="k-required">*</span>
16+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="k-required">*</span>
1717
</span>
1818
</label>
1919
`,

src/kendo/src/lib/wrappers/form-field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
77
<label [for]="id" class="k-form-field">
88
<span *ngIf="to.label && to.hideLabel !== true">
99
{{ to.label }}
10-
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="k-required">*</span>
10+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="k-required">*</span>
1111
</span>
1212
<ng-container #fieldComponent></ng-container>
1313
</label>

src/material/checkbox/src/checkbox.type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { FocusMonitor } from '@angular/cdk/a11y';
1515
[color]="to.color"
1616
[labelPosition]="to.align || to.labelPosition">
1717
{{ to.label }}
18-
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="mat-form-field-required-marker">*</span>
18+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="mat-form-field-required-marker">*</span>
1919
</mat-checkbox>
2020
`,
2121
})

src/material/form-field/src/form-field.wrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface MatFormlyFieldConfig extends FormlyFieldConfig {
2222
<ng-container #fieldComponent></ng-container>
2323
<mat-label *ngIf="to.label && to.hideLabel !== true">
2424
{{ to.label }}
25-
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="mat-form-field-required-marker">*</span>
25+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="mat-form-field-required-marker">*</span>
2626
</mat-label>
2727
2828
<ng-container matPrefix *ngIf="to.prefix || to._matPrefix">

src/primeng/src/lib/wrappers/form-field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
77
<div *ngIf="to.label && to.hideLabel !== true" class="ui-widget">
88
<label [for]="id">
99
{{ to.label }}
10-
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
10+
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
1111
</label>
1212
</div>
1313
<ng-container #fieldComponent></ng-container>

0 commit comments

Comments
 (0)