Merge branch 'mbruce/bugfix' into bugfix/badgeIndicator

This commit is contained in:
Matt Bruce 2024-04-02 15:52:22 -05:00
commit 517ecf94a2
5 changed files with 46 additions and 32 deletions

View File

@ -7,11 +7,11 @@
objects = {
/* Begin PBXBuildFile section */
1808BEBC2BA41C3200129230 /* CarouselScrollbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1808BEBB2BA41C3200129230 /* CarouselScrollbar.swift */; };
1808BEC02BA456B700129230 /* CarouselScrollbarChangeLog.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1808BEBF2BA456B700129230 /* CarouselScrollbarChangeLog.txt */; };
1832AC572BA0791D008AE476 /* BreadcrumbCellItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1832AC562BA0791D008AE476 /* BreadcrumbCellItem.swift */; };
18450CF12BA1B19C009FDF2A /* BreadcrumbsChangeLog.txt in Resources */ = {isa = PBXBuildFile; fileRef = 18450CF02BA1B19C009FDF2A /* BreadcrumbsChangeLog.txt */; };
1855EC662BAABF2A002ACAC2 /* BreadcrumbItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1855EC652BAABF2A002ACAC2 /* BreadcrumbItemModel.swift */; };
1808BEBC2BA41C3200129230 /* CarouselScrollbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1808BEBB2BA41C3200129230 /* CarouselScrollbar.swift */; };
1808BEC02BA456B700129230 /* CarouselScrollbarChangeLog.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1808BEBF2BA456B700129230 /* CarouselScrollbarChangeLog.txt */; };
186B2A8A2B88DA7F001AB71F /* TextAreaChangeLog.txt in Resources */ = {isa = PBXBuildFile; fileRef = 186B2A892B88DA7F001AB71F /* TextAreaChangeLog.txt */; };
18792A902B7431F2008C0D29 /* ButtonIconBadgeIndicatorModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18792A8F2B7431F2008C0D29 /* ButtonIconBadgeIndicatorModel.swift */; };
18A65A022B96E848006602CC /* Breadcrumbs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18A65A012B96E848006602CC /* Breadcrumbs.swift */; };
@ -196,11 +196,11 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1808BEBB2BA41C3200129230 /* CarouselScrollbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselScrollbar.swift; sourceTree = "<group>"; };
1808BEBF2BA456B700129230 /* CarouselScrollbarChangeLog.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CarouselScrollbarChangeLog.txt; sourceTree = "<group>"; };
1832AC562BA0791D008AE476 /* BreadcrumbCellItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbCellItem.swift; sourceTree = "<group>"; };
18450CF02BA1B19C009FDF2A /* BreadcrumbsChangeLog.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = BreadcrumbsChangeLog.txt; sourceTree = "<group>"; };
1855EC652BAABF2A002ACAC2 /* BreadcrumbItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbItemModel.swift; sourceTree = "<group>"; };
1808BEBB2BA41C3200129230 /* CarouselScrollbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselScrollbar.swift; sourceTree = "<group>"; };
1808BEBF2BA456B700129230 /* CarouselScrollbarChangeLog.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CarouselScrollbarChangeLog.txt; sourceTree = "<group>"; };
186B2A892B88DA7F001AB71F /* TextAreaChangeLog.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = TextAreaChangeLog.txt; sourceTree = "<group>"; };
18792A8F2B7431F2008C0D29 /* ButtonIconBadgeIndicatorModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonIconBadgeIndicatorModel.swift; sourceTree = "<group>"; };
18A65A012B96E848006602CC /* Breadcrumbs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Breadcrumbs.swift; sourceTree = "<group>"; };
@ -398,6 +398,15 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
1808BEBA2BA41B1D00129230 /* CarouselScrollbar */ = {
isa = PBXGroup;
children = (
1808BEBB2BA41C3200129230 /* CarouselScrollbar.swift */,
1808BEBF2BA456B700129230 /* CarouselScrollbarChangeLog.txt */,
);
path = CarouselScrollbar;
sourceTree = "<group>";
};
18A65A002B96E7E1006602CC /* Breadcrumbs */ = {
isa = PBXGroup;
children = (
@ -410,15 +419,6 @@
path = Breadcrumbs;
sourceTree = "<group>";
};
1808BEBA2BA41B1D00129230 /* CarouselScrollbar */ = {
isa = PBXGroup;
children = (
1808BEBB2BA41C3200129230 /* CarouselScrollbar.swift */,
1808BEBF2BA456B700129230 /* CarouselScrollbarChangeLog.txt */,
);
path = CarouselScrollbar;
sourceTree = "<group>";
};
445BA07629C07ABA0036A7C5 /* Notification */ = {
isa = PBXGroup;
children = (
@ -1369,7 +1369,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 55;
CURRENT_PROJECT_VERSION = 56;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1406,7 +1406,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 55;
CURRENT_PROJECT_VERSION = 56;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;

View File

@ -279,10 +279,10 @@ open class BadgeIndicator: View {
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
open override func setup() {
super.setup()
isAccessibilityElement = true
addSubview(badgeView)
badgeView.addSubview(label)
accessibilityElements = [label]
heightConstraint = badgeView.heightGreaterThanEqualTo(constant: badgeSize)
widthConstraint = badgeView.widthGreaterThanEqualTo(constant: badgeSize)
@ -359,6 +359,15 @@ open class BadgeIndicator: View {
label.debugBorder(color: .green)
}
open override func updateAccessibility() {
super.updateAccessibility()
if kind == .numbered {
accessibilityLabel = label.text
} else {
accessibilityLabel = "Simple"
}
}
open override func layoutSubviews() {
super.layoutSubviews()

View File

@ -108,7 +108,10 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
open var badgeIndicatorModel: BadgeIndicatorModel? { didSet { setNeedsUpdate() } }
/// Icon object used to render out the Icon for this ButtonIcon.
open var icon = Icon().with { $0.isUserInteractionEnabled = false }
open var icon = Icon().with {
$0.isUserInteractionEnabled = false
$0.accessibilityTraits = .button
}
/// Determines the type of button based on the contrast.
open var kind: Kind = .ghost { didSet { setNeedsUpdate() } }
@ -342,9 +345,8 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
open override func setup() {
super.setup()
isAccessibilityElement = true
accessibilityTraits = .button
accessibilityElements = [badgeIndicator]
isAccessibilityElement = false
accessibilityElements = [icon, badgeIndicator]
//create a layoutGuide for the icon to key off of
let iconLayoutGuide = UILayoutGuide()

View File

@ -247,6 +247,11 @@ open class Notification: View {
subTitleLabel.textColorConfiguration = textColorConfiguration.eraseToAnyColorable()
//TODO: Need to add setup animation for displaying the Notification view for iOS.
isAccessibilityElement = false
accessibilityElements = [closeButton, typeIcon, titleLabel, subTitleLabel, buttonGroup]
closeButton.accessibilityTraits = [.button]
closeButton.accessibilityLabel = "Close Notification"
}
/// Resets to default settings.
@ -298,17 +303,7 @@ open class Notification: View {
super.layoutSubviews()
layer.cornerRadius = UIScreen.main.bounds.width == bounds.width ? 0 : 4.0
}
///Updating the accessiblity values i.e elements, label, value other items for the component.
open override func updateAccessibility() {
super.updateAccessibility()
accessibilityElements = [closeButton, typeIcon, titleLabel, subTitleLabel, buttonGroup]
typeIcon.accessibilityLabel = style.rawValue
typeIcon.imageView.image?.isAccessibilityElement = false
closeButton.accessibilityTraits = [.button]
closeButton.accessibilityLabel = "Close Notification"
}
//--------------------------------------------------
// MARK: - Private Methods
//--------------------------------------------------

View File

@ -1,3 +1,11 @@
1.0.56
----------------
- ONEAPP-7190 - Breadcrumbs - Finished Development
- ONEAPP-6830 - CarouselScrollbar - Finished Development
- ONEAPP-6978 - Pagination - Finished Development
- ONEAPP-6984 - Tilelet - Finished Development
- ONEAPP-6682 - TextArea - Finished Development
1.0.55
----------------
- ONEAPP-6305 - BadgeIndicator - Finished Development