From c0828f69eea0cab3961288b4ea281f18dc825b7f Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Mon, 16 Aug 2021 23:00:43 +0530 Subject: [PATCH] Changing the way accessibility trait is set. --- .../OneColumn/ListOneColumnFullWidthTextBodyText.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift index eaf4be42..7a17dd1b 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift @@ -43,9 +43,16 @@ import Foundation // MARK: - Accessibility //----------------------------------------------------- + /// Ensures voice over does not read "selected" after user triggers action on cell. + override public var accessibilityTraits: UIAccessibilityTraits { + get { + return (accessoryView != nil) ? .button : .none + } + set {} + } + func updateAccessibilityLabel() { isAccessibilityElement = true - accessibilityTraits = (accessoryView != nil) ? .button : .none var message = "" if let headlineLabel = headlineBody.headlineLabel.text {