Skip to content

Commit

Permalink
[Slider#204] Added accessibility identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisBorleeAdevinta committed Dec 12, 2023
1 parent 7791f33 commit b4dce25
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// SliderAccessibilityIdentifier.swift
// SparkCore
//
// Created by louis.borlee on 12.12.23.
// Copyright © 2023 Adevinta. All rights reserved.
//

import Foundation

/// The accessibility identifiers for the slider.
public enum SliderAccessibilityIdentifier {

// MARK: - Properties

/// The text label accessibility identifier.
public static let slider = "spark-slider"
}
1 change: 1 addition & 0 deletions core/Sources/Components/Slider/View/SliderUIControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public final class SliderUIControl: UIControl {
guard let self else { return }
self.valueSubject.send(self.value)
}), for: .valueChanged)
self.accessibilityIdentifier = SliderAccessibilityIdentifier.slider
}

required init?(coder: NSCoder) {
Expand Down

0 comments on commit b4dce25

Please sign in to comment.