Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: a11y aggiunta labelWaria sui componenti Callout, Autocomplete e Stepper #322

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ng-template #inner>
@if (label) {
<div class="callout-title">
<it-icon [name]="iconName"></it-icon>
<it-icon [labelWaria]="labelWaria" [name]="iconName"></it-icon>
@if (hiddenLabel) {
<span class="visually-hidden">{{ hiddenLabel }}</span>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@
*/
@Input() icon: IconName | undefined;

/**
* The input label even get labelWaria icon
* @default undefined
*/
@Input() labelWaria: string | undefined = undefined;

getlabel() {
return this.labelWaria;

Check warning on line 71 in projects/design-angular-kit/src/lib/components/core/callout/callout.component.ts

View check run for this annotation

Codecov / codecov/patch

projects/design-angular-kit/src/lib/components/core/callout/callout.component.ts#L71

Added line #L71 was not covered by tests
}

protected get iconName(): IconName {
if (this.icon) {
return this.icon;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@for (step of steps; track step.id; let i = $index) {
<li [class.confirmed]="i < activeStep" [class.active]="i === activeStep" [class.no-line]="i === activeStep && steppersNumber">
@if (step.icon && !steppersNumber) {
<it-icon [name]="step.icon"></it-icon>
<it-icon [labelWaria]="'check'" [name]="step.icon"></it-icon>
}
@if (steppersNumber) {
<span class="steppers-number">
Expand Down Expand Up @@ -58,7 +58,7 @@
class="steppers-btn-prev"
[disabled]="disableBackButton"
(click)="backClick.emit(activeStep)">
<it-icon name="chevron-left" color="primary"></it-icon>
<it-icon [labelWaria]="'left'" name="chevron-left" color="primary"></it-icon>
{{ 'it.core.back' | translate }}
</button>
}
Expand Down Expand Up @@ -101,7 +101,7 @@
[disabled]="disableForwardButton"
(click)="forwardClick.emit(activeStep)">
{{ 'it.core.forward' | translate }}
<it-icon name="chevron-right" color="primary"></it-icon>
<it-icon [labelWaria]="'right'" name="chevron-right" color="primary"></it-icon>
</button>
}
@if (showConfirmButton) {
Expand All @@ -121,6 +121,6 @@
</div>

<ng-template #checkIcon>
<it-icon name="check" class="steppers-success"></it-icon>
<it-icon [labelWaria]="'check'" name="check" class="steppers-success"></it-icon>
<span class="visually-hidden">{{ 'it.core.confirmed' | translate }}</span>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(keydown)="onKeyDown()" />

<span class="autocomplete-icon" aria-hidden="true">
<it-icon name="search" size="sm"></it-icon>
<it-icon [labelWaria]="labelWaria" name="search" size="sm"></it-icon>
</span>

@if (autocompleteResults$ | async; as autocomplete) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export class ItAutocompleteComponent extends ItAbstractFormComponent<string | nu
*/
@Input() placeholder = '';

/**
* The input label even get labelWaria icon
*/
@Input() labelWaria: string | undefined = undefined;

/**
* Show the label
*/
Expand Down
Loading