CXTDT-552834 - TileContainer - Accessibility – Voice over is not rendering the information present click state. Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
49 lines
1.5 KiB
Swift
49 lines
1.5 KiB
Swift
//
|
|
// TiletDescriptiveIconModel.swift
|
|
// VDS
|
|
//
|
|
// Created by Matt Bruce on 1/11/23.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
extension Tilelet {
|
|
|
|
/// Model that represents the options available for the descriptive icon.
|
|
public struct DescriptiveIcon {
|
|
/// A representation that will be used to render the icon with corresponding name.
|
|
public var name: Icon.Name
|
|
|
|
/// Enum for a preset height and width for the icon.
|
|
public var size: Icon.Size
|
|
|
|
/// Accessible Text for the Icon
|
|
var accessibleText: String
|
|
|
|
/// Current Surface and this is used to pass down to child objects that implement Surfacable
|
|
public var surface: Surface
|
|
|
|
public init(name: Icon.Name = .multipleDocuments, size: Icon.Size = .medium, accessibleText: String? = nil, surface: Surface = .dark) {
|
|
self.name = name
|
|
self.accessibleText = accessibleText ?? name.rawValue
|
|
self.size = size
|
|
self.surface = surface
|
|
}
|
|
}
|
|
|
|
/// Model that represents the options available for the directional icon.
|
|
public struct DirectionalIcon {
|
|
/// Enum for a preset height and width for the icon.
|
|
public var size: Icon.Size
|
|
|
|
/// Current Surface and this is used to pass down to child objects that implement Surfacable
|
|
public var surface: Surface
|
|
|
|
public init(size: Icon.Size = .medium, surface: Surface = .dark) {
|
|
self.size = size
|
|
self.surface = surface
|
|
}
|
|
}
|
|
}
|