Skip to content

Commit f379d99

Browse files
[ACS-10281] a11y fix - Approve step folder control is focusable twice causing duplicate screen reader (#11385)
* [ACS-10281] a11y fix - Approve step folder control is focusable twice causing duplicate screen reader * [ACS-10281] cr fix
1 parent f317374 commit f379d99

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,20 @@
104104
</mat-form-field>
105105
</div>
106106

107-
<div
107+
<button
108+
type="button"
108109
*ngSwitchCase="'clickableTemplate'"
109-
role="button"
110110
class="adf-textitem-clickable"
111111
[ngClass]="{ 'adf-property-read-only': !isEditable }"
112112
[attr.data-automation-id]="'card-textitem-toggle-' + property.key"
113-
tabindex="0"
114-
(keyup.enter)="clicked()"
115113
(click)="clicked()"
116114
>
117115
<mat-form-field class="adf-property-field adf-card-textitem-field" [floatLabel]="'always'">
118116
<mat-label
119117
*ngIf="showProperty || isEditable"
120118
[attr.data-automation-id]="'card-textitem-label-' + property.key"
121119
class="adf-property-label"
120+
(click)="$event.stopPropagation()"
122121
[ngClass]="{ 'adf-property-value-editable': editable }"
123122
>
124123
{{ property.label | translate }}
@@ -127,7 +126,6 @@
127126
matInput
128127
[type]="property.inputType"
129128
class="adf-property-value"
130-
title="{{ property.label | translate }}"
131129
[ngClass]="{
132130
'adf-property-value-editable': editable,
133131
'adf-textitem-clickable-value': isClickable,
@@ -136,11 +134,11 @@
136134
'adf-property-value-has-icon-suffix': showClickableIcon
137135
}"
138136
[placeholder]="property.default"
139-
[attr.aria-label]="property.label | translate"
140137
[(ngModel)]="editedValue"
141138
(blur)="update()"
142139
(keydown.enter)="update()"
143140
[readonly]="!isEditable"
141+
tabindex="-1"
144142
[attr.data-automation-id]="'card-textitem-value-' + property.key"
145143
/>
146144
<button
@@ -154,7 +152,7 @@
154152
<mat-icon class="adf-textitem-icon">{{ property?.icon }}</mat-icon>
155153
</button>
156154
</mat-form-field>
157-
</div>
155+
</button>
158156

159157
<div *ngSwitchCase="'emptyTemplate'">
160158
<span class="adf-textitem-default-value">{{ property.default | translate }}</span>

lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@
6060
}
6161

6262
.adf-textitem-clickable {
63+
background: none;
64+
border: none;
65+
margin: 0;
6366
cursor: pointer;
64-
padding-top: 3px;
67+
width: 100%;
68+
padding: 3px 0 0;
6569

6670
.adf-textitem-action:hover {
6771
color: var(--adf-theme-foreground-text-color);

0 commit comments

Comments
 (0)