From 1f37597117e91c500dc6ccc45d3739e56a678d78 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Fri, 20 Sep 2024 13:04:47 +0530 Subject: [PATCH] Digital ACT-191 ONEAPP-10928 story: added change log file --- VDS/Components/Modal/Modal.swift | 20 +++++++- VDS/Components/Modal/ModalChangeLog.txt | 67 +++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 VDS/Components/Modal/ModalChangeLog.txt diff --git a/VDS/Components/Modal/Modal.swift b/VDS/Components/Modal/Modal.swift index 6f28175c..c0c28392 100644 --- a/VDS/Components/Modal/Modal.swift +++ b/VDS/Components/Modal/Modal.swift @@ -2,7 +2,7 @@ // Modal.swift // VDS // -// Created by Kanamarlapudi, Vasavi on 5/09/24. +// Created by Kanamarlapudi, Vasavi on 05/09/24. // import Foundation @@ -75,6 +75,24 @@ open class Modal: Control, ModalLaunchable { contentView = nil showModalButton.onClick = { _ in self.showModalButtonClick() } + + bridge_accessibilityLabelBlock = { [weak self] in + guard let self else { return "" } + var label = title + if label == nil { + label = content + } + if let label, !label.isEmpty { + return label + } else { + return "Modal" + } + } + + bridge_accessibilityHintBlock = { [weak self] in + guard let self else { return "" } + return isEnabled ? "Double tap to open." : "" + } } internal func showModalButtonClick() { diff --git a/VDS/Components/Modal/ModalChangeLog.txt b/VDS/Components/Modal/ModalChangeLog.txt new file mode 100644 index 00000000..7716b8b2 --- /dev/null +++ b/VDS/Components/Modal/ModalChangeLog.txt @@ -0,0 +1,67 @@ +MM/DD/YYYY +---------------- +- Initial Brand 3.0 handoff + +12/17/2021 +---------------- +- Replaced focusring colors (previously interactive/onlight/ondark) with accessibility/onlight/ondark colors +- Updated focus border name (previously interactive.focusring.onlight) with focusring.onlight/ondark + +12/31/2021 +---------------- +- Updated Hover and Active state trigger specs. If triggered by mouse, Active same as Hover. If not, Active same as Default. + +03/01/2022 +---------------- +- Replaced Close Non-Scaling icon with VDS Icon. +- Removed “vector effect” from Anatomy. +- Removed “weight” from Configurations. + +08/10/2022 +---------------- +- Updated default and inverted prop to light and dark surface. +- Noted that button is optional within anatomy + +09/06/2022 +---------------- +- Updated Anatomy element names to remove the word “Modal” from text elements, updated Button to be Button Group, +and noted Button Group as optional across all visuals within Anatomy. + +11/30/2022 +---------------- +- Added "(web only)" to any instance of "keyboard focus" + +12/13/2022 +---------------- +- Replaced focus border pixel and style & spacing values with tokens. + +04/24/2023 +---------------- +- Updated all instances of Close Button (VDS Icon) with VDS Button Icon (size small) +- Button Icon placed 8px from top/right edge +- Use the Ghost variant of Button Icon +- Added Button Icon props to Elements spec + +10/17/2023 +---------------- +- Added component tokens table +- Applied component tokens to light, dark surface configurations + +11/22/2023 +---------------- +- Updated tab/desk visuals to reflect new corner radius value - 12px +- Updated border radius value in Anatomy + +11/27/2023 +---------------- +- Updated ‘border radius” to “corner radius” in Anatomy + +12/1/2023 +---------------- +- Applied palette tokens instead of hardcoded values where component tokens included an opacity +- Removed layer opacity annotation for instances where opacity is built into a component token + +07/18/2024 +---------------- +- Added Scrollbar hit area with z-index specifications to the Behaviors page +- Decreased the height of the Grab zone to equal the height of the scrollbar thumb on the Behaviors page