Bug 1583428 - Remove the alt attribute for the favicon since it is not helpful and remove the alt attribute on the breached website icon so the title of 'Breached Website' is spoken. r=fluent-reviewers,MattN,flod

Differential Revision: https://phabricator.services.mozilla.com/D47811

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jared Wein 2019-10-03 16:05:22 +00:00
parent 2ed60e9a99
commit 7fa1305555
5 changed files with 30 additions and 18 deletions

View File

@ -113,13 +113,13 @@
<template id="login-list-item-template">
<li class="login-list-item" role="option">
<div class="favicon-wrapper">
<img class="favicon" src="" alt=""/>
<img class="favicon" src=""/>
</div>
<div class="labels">
<span class="title" dir="auto"></span>
<span class="username" dir="ltr"></span>
</div>
<img data-l10n-id="about-logins-list-item-warning-icon" class="list-item-warning-icon" alt="" title="" src="chrome://global/skin/icons/warning.svg"/>
<img data-l10n-id="about-logins-list-item-breach-icon" class="list-item-warning-icon" title="" src="chrome://global/skin/icons/warning.svg"/>
</li>
</template>
@ -162,7 +162,7 @@
</div>
<div class="header">
<div class="login-item-favicon-wrapper">
<img class="login-item-favicon" src="" alt=""/>
<img class="login-item-favicon" src=""/>
</div>
<h2 class="title">
<span class="login-item-title"></span>

View File

@ -148,10 +148,6 @@ export default class LoginItem extends HTMLElement {
timeUsed: this._login.timeLastUsed || "",
});
document.l10n.setAttributes(this._favicon, "login-favicon", {
title: this._login.title,
});
if (this._login.faviconDataURI) {
this._faviconWrapper.classList.add("hide-default-favicon");
this._favicon.src = this._login.faviconDataURI;

View File

@ -60,9 +60,6 @@ export default class LoginListItemFactory {
if (login.faviconDataURI) {
faviconWrapper.classList.add("hide-default-favicon");
favicon.src = login.faviconDataURI;
document.l10n.setAttributes(favicon, "login-favicon", {
title: login.title,
});
}
}
}

View File

@ -18,12 +18,6 @@ login-filter =
create-login-button = Create New Login
# This string is used as alternative text for favicon images.
# Variables:
# $title (String) - The title of the website associated with the favicon.
login-favicon =
.alt = Favicon for { $title }
fxaccounts-sign-in-text = Get your passwords on your other devices
fxaccounts-sign-in-button = Sign in to { -sync-brand-short-name }
fxaccounts-avatar-button =
@ -65,8 +59,7 @@ about-logins-login-list-empty-search-description = There are no results matching
login-list-item-title-new-login = New Login
login-list-item-subtitle-new-login = Enter your login credentials
login-list-item-subtitle-missing-username = (no username)
about-logins-list-item-warning-icon =
.alt = Warning icon
about-logins-list-item-breach-icon =
.title = Breached website
## Introduction screen

View File

@ -0,0 +1,26 @@
# coding=utf8
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
import fluent.syntax.ast as FTL
from fluent.migrate.helpers import transforms_from
from fluent.migrate import COPY_PATTERN
TARGET_FILE = "browser/browser/aboutLogins.ftl"
SOURCE_FILE = TARGET_FILE
def migrate(ctx):
"""Bug 1583428 - Remove unnecessary alt attribute on breach icon, part {index}."""
ctx.add_transforms(
TARGET_FILE,
SOURCE_FILE,
transforms_from(
"""
about-logins-list-item-breach-icon =
.title = {COPY_PATTERN(from_path, "about-logins-list-item-warning-icon.title")}
""",
from_path=SOURCE_FILE),
)