@@ -17,18 +17,21 @@ <h2 bitTypography="h6">{{ "customFields" | i18n }}</h2>
1717 bitInput
1818 [value] ="field.value ?? '' "
1919 aria-readonly ="true "
20+ [attr.aria-label] ="emptyFieldAriaLabel(field) "
2021 vaultAutosizeReadOnlyTextArea
2122 > </ textarea >
22- < button
23- bitIconButton ="bwi-clone "
24- bitSuffix
25- type ="button "
26- [appCopyClick] ="field.value "
27- showToast
28- [valueLabel] ="field.name "
29- [label] ="'copyCustomField' | i18n: field.name "
30- data-testid ="copy-custom-field "
31- > </ button >
23+ @if (field.value) {
24+ < button
25+ bitIconButton ="bwi-clone "
26+ bitSuffix
27+ type ="button "
28+ [appCopyClick] ="field.value "
29+ showToast
30+ [valueLabel] ="field.name "
31+ [label] ="'copyCustomField' | i18n: field.name "
32+ data-testid ="copy-custom-field "
33+ > </ button >
34+ }
3235 </ bit-form-field >
3336 }
3437 @if (field.type === fieldType.Hidden) {
@@ -41,6 +44,7 @@ <h2 bitTypography="h6">{{ "customFields" | i18n }}</h2>
4144 type ="password "
4245 [value] ="field.value ?? '' "
4346 aria-readonly ="true "
47+ [attr.aria-label] ="emptyFieldAriaLabel(field) "
4448 class ="tw-font-mono "
4549 />
4650 }
@@ -50,7 +54,7 @@ <h2 bitTypography="h6">{{ "customFields" | i18n }}</h2>
5054 readonly
5155 bitInput
5256 type ="password "
53- [value] ="field.value "
57+ [value] ="field.value ?? '' "
5458 aria-readonly ="true "
5559 class ="tw-font-mono "
5660 vaultAutosizeReadOnlyTextArea
@@ -73,7 +77,7 @@ <h2 bitTypography="h6">{{ "customFields" | i18n }}</h2>
7377 (click) ="toggleCharacterCount(i) "
7478 > </ button >
7579 }
76- @if (canViewPassword) {
80+ @if (canViewPassword && field.value ) {
7781 < button
7882 bitSuffix
7983 type ="button "
@@ -82,7 +86,7 @@ <h2 bitTypography="h6">{{ "customFields" | i18n }}</h2>
8286 (toggledChange) ="toggleHiddenField($event, i) "
8387 > </ button >
8488 }
85- @if (canViewPassword) {
89+ @if (canViewPassword && field.value ) {
8690 < button
8791 bitIconButton ="bwi-clone "
8892 bitSuffix
0 commit comments