Bug 1789533 - Improve title text (tooltips) experience in Firefox View. r=sclements

Differential Revision: https://phabricator.services.mozilla.com/D164460
This commit is contained in:
prathikshaprasadsuman 2022-12-14 21:39:00 +00:00
parent 7f26be9e72
commit 5bc6164795
2 changed files with 10 additions and 6 deletions

View File

@ -327,10 +327,14 @@ class RecentlyClosedTabsList extends HTMLElement {
// have all the requisite information for them immediately.
updateURLForListItem(li, targetURI) {
li.dataset.targetURI = targetURI;
document.l10n.setAttributes(li, "firefoxview-tabs-list-tab-button", {
targetURI,
});
let urlElement = li.querySelector(".closed-tab-li-url");
document.l10n.setAttributes(
urlElement,
"firefoxview-tabs-list-tab-button",
{
targetURI,
}
);
if (targetURI) {
urlElement.textContent = formatURIForDisplay(targetURI);
urlElement.title = targetURI;

View File

@ -281,9 +281,6 @@ class TabPickupList extends HTMLElement {
a.setAttribute("tabindex", "-1");
}
a.addEventListener("keydown", this);
document.l10n.setAttributes(a, "firefoxview-tabs-list-tab-button", {
targetURI,
});
const title = document.createElement("span");
title.textContent = tab.title;
@ -311,6 +308,9 @@ class TabPickupList extends HTMLElement {
url.textContent = formatURIForDisplay(tab.url);
url.title = tab.url;
url.classList.add("synced-tab-li-url");
document.l10n.setAttributes(url, "firefoxview-tabs-list-tab-button", {
targetURI,
});
device.classList.add("synced-tab-li-device");
// the first list item is different from the second and third