Skip to content

Commit

Permalink
fix(core): set aria-hidden to required marker (#2913)
Browse files Browse the repository at this point in the history
fix #2887
  • Loading branch information
aitboudad committed Jul 6, 2021
1 parent 32fac5b commit 2d70d9f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/src/lib/types/checkbox.ts
Expand Up @@ -26,7 +26,7 @@ import { FieldType } from '@ngx-formly/core';
[class.custom-control-label]="to.formCheck.indexOf('custom') === 0"
>
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
</label>
</div>
`,
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/lib/wrappers/form-field.wrapper.ts
Expand Up @@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
<div class="form-group" [class.has-error]="showError">
<label *ngIf="to.label && to.hideLabel !== true" [attr.for]="id">
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
</label>
<ng-template #fieldComponent></ng-template>
Expand Down
2 changes: 1 addition & 1 deletion src/ionic/src/lib/wrappers/form-field.ts
Expand Up @@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
<ion-item [lines]="to.itemLines">
<ion-label [position]="to.labelPosition">
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
</ion-label>
<ng-template #fieldComponent></ng-template>
</ion-item>
Expand Down
2 changes: 1 addition & 1 deletion src/kendo/src/lib/types/checkbox.ts
Expand Up @@ -13,7 +13,7 @@ import { FieldType } from '@ngx-formly/core';
<label [for]="id" class="k-checkbox-label">
<span>
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="k-required">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="k-required">*</span>
</span>
</label>
`,
Expand Down
2 changes: 1 addition & 1 deletion src/kendo/src/lib/wrappers/form-field.ts
Expand Up @@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
<label [for]="id" class="k-form-field">
<span *ngIf="to.label && to.hideLabel !== true">
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="k-required">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="k-required">*</span>
</span>
<ng-container #fieldComponent></ng-container>
</label>
Expand Down
2 changes: 1 addition & 1 deletion src/material/checkbox/src/checkbox.type.ts
Expand Up @@ -15,7 +15,7 @@ import { FocusMonitor } from '@angular/cdk/a11y';
[color]="to.color"
[labelPosition]="to.align || to.labelPosition">
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="mat-form-field-required-marker">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="mat-form-field-required-marker">*</span>
</mat-checkbox>
`,
})
Expand Down
2 changes: 1 addition & 1 deletion src/material/form-field/src/form-field.wrapper.ts
Expand Up @@ -22,7 +22,7 @@ interface MatFormlyFieldConfig extends FormlyFieldConfig {
<ng-container #fieldComponent></ng-container>
<mat-label *ngIf="to.label && to.hideLabel !== true">
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true" class="mat-form-field-required-marker">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true" class="mat-form-field-required-marker">*</span>
</mat-label>
<ng-container matPrefix *ngIf="to.prefix || to._matPrefix">
Expand Down
2 changes: 1 addition & 1 deletion src/primeng/src/lib/wrappers/form-field.ts
Expand Up @@ -7,7 +7,7 @@ import { FieldWrapper } from '@ngx-formly/core';
<div *ngIf="to.label && to.hideLabel !== true" class="ui-widget">
<label [for]="id">
{{ to.label }}
<span *ngIf="to.required && to.hideRequiredMarker !== true">*</span>
<span *ngIf="to.required && to.hideRequiredMarker !== true" aria-hidden="true">*</span>
</label>
</div>
<ng-container #fieldComponent></ng-container>
Expand Down

0 comments on commit 2d70d9f

Please sign in to comment.