Bug 1854056 - using bullet in autofill previews instead of * r=mtigley,credential-management-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D191360
This commit is contained in:
Sergey Galich 2023-10-23 16:56:20 +00:00
Родитель 6a8780f64d
Коммит 097aac74ea
3 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -141,8 +141,8 @@
this.getAttribute("ac-value")
);
this._label.textContent = primary;
this._comment.textContent = secondary;
this._label.textContent = primary.replaceAll("*", "•");
this._comment.textContent = secondary.replaceAll("*", "•");
if (ariaLabel) {
this.setAttribute("aria-label", ariaLabel);
}

Просмотреть файл

@ -417,7 +417,11 @@ export class CreditCardResult extends ProfileAutoCompleteResult {
const ccTypeName = ccTypeL10nId
? lazy.l10n.formatValueSync(ccTypeL10nId)
: ccType ?? ""; // Unknown card type
const ariaLabel = [ccTypeName, primary.toString().replaceAll("*", ""), secondary]
const ariaLabel = [
ccTypeName,
primary.toString().replaceAll("*", ""),
secondary,
]
.filter(chunk => !!chunk) // Exclude empty chunks.
.join(" ");
return {

Просмотреть файл

@ -433,7 +433,7 @@ export class FormAutofillSection {
// Skip the field if the user has already entered text and that text is not the site prefilled value.
continue;
}
element.previewValue = value;
element.previewValue = value.replaceAll?.("*", "•");
this.handler.changeFieldState(
fieldDetail,
value ? FIELD_STATES.PREVIEW : FIELD_STATES.NORMAL