5 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,19 @@ struct TopSiteConfiguration: Hashable, Equatable {
14
14
return . FirefoxHomepage. Shortcuts. Sponsored
15
15
}
16
16
17
+ private var pinnedTitle : String {
18
+ . localizedStringWithFormat(
19
+ . FirefoxHomepage. Shortcuts. PinnedAccessibilityLabel,
20
+ title
21
+ )
22
+ }
23
+
24
+ private var pinnedStatusTitle : String {
25
+ return isPinned ? pinnedTitle : title
26
+ }
27
+
17
28
var accessibilityLabel : String ? {
18
- return isSponsored ? " \( title ) , \( sponsoredText) " : title
29
+ return isSponsored ? " \( pinnedStatusTitle ) , \( sponsoredText) " : pinnedStatusTitle
19
30
}
20
31
21
32
var isPinned : Bool {
Original file line number Diff line number Diff line change @@ -14,8 +14,19 @@ final class TopSite: FeatureFlaggable {
14
14
return . FirefoxHomepage. Shortcuts. Sponsored
15
15
}
16
16
17
+ private var pinnedTitle : String {
18
+ . localizedStringWithFormat(
19
+ . FirefoxHomepage. Shortcuts. PinnedAccessibilityLabel,
20
+ title
21
+ )
22
+ }
23
+
24
+ private var pinnedStatusTitle : String {
25
+ isPinned ? pinnedTitle : title
26
+ }
27
+
17
28
var accessibilityLabel : String ? {
18
- return isSponsored ? " \( title ) , \( sponsoredText) " : title
29
+ return isSponsored ? " \( pinnedStatusTitle ) , \( sponsoredText) " : pinnedStatusTitle
19
30
}
20
31
21
32
var isPinned : Bool {
Original file line number Diff line number Diff line change @@ -1172,6 +1172,13 @@ extension String {
1172
1172
tableName: nil ,
1173
1173
value: " Sponsored " ,
1174
1174
comment: " This string will show under a shortcuts tile on the firefox home page, indicating that the tile is a sponsored tile. Space is limited, please keep as short as possible. " )
1175
+
1176
+ public static let PinnedAccessibilityLabel = MZLocalizedString (
1177
+ key: " FirefoxHomepage.Shortcuts.Pinned.AccessibilityLabel.v139 " ,
1178
+ tableName: " FirefoxHomepage " ,
1179
+ value: " Pinned: %@ " ,
1180
+ comment: " Accessibility label for shortcuts tile on the Firefox home page, indicating that the tile is a pinned tile. %@ is the title of the website. "
1181
+ )
1175
1182
}
1176
1183
1177
1184
public struct YourLibrary { }
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ class BrowsingPDFTests: BaseTestCase {
109
109
// Open pdf from pinned site
110
110
let pdfTopSite = app
111
111
. collectionViews [ AccessibilityIdentifiers . FirefoxHomepage. collectionView]
112
- . links [ PDF_website [ " bookmarkLabel " ] !]
112
+ . links [ " Pinned: \( PDF_website [ " bookmarkLabel " ] !) " ]
113
113
. children ( matching: . other)
114
114
. element
115
115
. children ( matching: . other)
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ class PhotonActionSheetTests: BaseTestCase {
23
23
let cell = itemCell. staticTexts [ " Example Domain " ]
24
24
mozWaitForElementToExist ( cell)
25
25
if #available( iOS 17 , * ) {
26
- mozWaitForElementToExist ( app. links [ " Example Domain " ] . images [ StandardImageIdentifiers . Small. pinBadgeFill] )
26
+ mozWaitForElementToExist ( app. links [ " Pinned: Example Domain" ] . images [ StandardImageIdentifiers . Small. pinBadgeFill] )
27
27
} else {
28
28
// No identifier is available for iOS 17 amd below
29
- mozWaitForElementToExist ( app. links [ " Example Domain " ] . images. element ( boundBy: 1 ) )
29
+ mozWaitForElementToExist ( app. links [ " Pinned: Example Domain" ] . images. element ( boundBy: 1 ) )
30
30
}
31
31
32
32
// Remove pin
0 commit comments