Revision control

Copy as Markdown

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
import Foundation
public struct EmbeddedLink: Sendable {
let fullText: String
let linkText: String
let action: TermsOfUseAction
/// Stable identifier applied to the rendered link so it is individually addressable in UI tests
/// and exposed as a distinct accessibility element. Falls back to the action when nil.
let accessibilityIdentifier: String?
public init(
fullText: String,
linkText: String,
action: TermsOfUseAction,
accessibilityIdentifier: String? = nil
) {
self.fullText = fullText
self.linkText = linkText
self.action = action
self.accessibilityIdentifier = accessibilityIdentifier
}
}