ONEAPP-4828 - [Accessibility] Toggle

ONEAPP-4684 - [Accessibility] Tooltip

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-10-10 14:36:21 -05:00
parent d2648489f0
commit 913cffe24e
2 changed files with 11 additions and 11 deletions

View File

@ -130,16 +130,15 @@ open class Tooltip: Control, TooltipLaunchable {
isAccessibilityElement = true isAccessibilityElement = true
accessibilityTraits = .button accessibilityTraits = .button
onClickSubscriber = publisher(for: .touchUpInside) onClick = { [weak self] tooltip in
.sink(receiveValue: { [weak self] tooltip in guard let self else { return}
guard let self else { return} self.presentTooltip(surface: tooltip.surface,
self.presentTooltip(surface: tooltip.surface, tooltipModel: .init(closeButtonText: tooltip.closeButtonText,
tooltipModel: .init(closeButtonText: tooltip.closeButtonText, title: tooltip.title,
title: tooltip.title, content: tooltip.content,
content: tooltip.content, contentView: tooltip.contentView),
contentView: tooltip.contentView), presenter: self)
presenter: self) }
})
} }
/// Resets to default settings. /// Resets to default settings.

View File

@ -22,7 +22,8 @@ extension Clickable {
set { set {
if let newValue { if let newValue {
onClickSubscriber = publisher(for: .touchUpInside) onClickSubscriber = publisher(for: .touchUpInside)
.sink { c in .sink { [weak self] c in
guard let self, self.isEnabled else { return }
newValue(c) newValue(c)
} }
} else { } else {