Skip to content

Commit

Permalink
DON-384: Update SearchField sizes and accessibility for the Place Sel…
Browse files Browse the repository at this point in the history
…ector GC (#1930)

* DON-384: Adjust the TextField of the Place Selector GC [sizes update and accessibility]

* DON-384: Adjust the TextField of the Place Selector GC [update UI tests]

* Record screenshots

* Record snapshots

* Updated snapshots

* Run CI build

---------

Co-authored-by: Yura Reutskiy <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 5, 2024
1 parent c2e413a commit a0a2ed6
Show file tree
Hide file tree
Showing 55 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public struct BPKAppSearchModal: View {
if results.showTextField {
BPKSearchInputSummary(placeholder: inputHint, inputPrefix: inputPrefix, $inputText)
.inputState(textFieldState.inputState)
.accessibilityAddTraits(.isSearchField)
.focused($inputFieldIsFocussed)
.autocorrectionDisabled(true)
}
Expand All @@ -72,6 +71,7 @@ public struct BPKAppSearchModal: View {
.padding(.top, .base)
.padding(.bottom, BPKSpacing.none)
.background(.surfaceDefaultColor)
.accessibilityAddTraits(.isModal)
}

func makeNavigationBar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ public struct BPKSearchInputSummary: View {
.foregroundColor(state.textColor)
.disabled(state.isDisabled)
.focused($focused)
.accessibilityElement(children: .combine)
.accessibilityAddTraits(.isSearchField)
accessory
}
.padding(.md)
.frame(maxWidth: .infinity, minHeight: 48.0)
.padding(.horizontal, BPKSpacing.base)
.background(.surfaceDefaultColor)
.clipShape(RoundedRectangle(cornerRadius: .sm))
.outline(focused ? .textLinkColor : state.borderColor, cornerRadius: .sm, lineWidth: focused ? 2.0 : 1.0)
Expand All @@ -79,7 +82,9 @@ public struct BPKSearchInputSummary: View {
BPKIconView(icon.icon)
.foregroundColor(icon.color)
}
.accessibilityLabel(accessibilityLabel)
.accessibilityElement(children: .ignore)
.accessibilityLabel(accessibilityLabel)
.accessibilityAddTraits(.isButton)
} else {
BPKIconView(icon.icon)
.foregroundColor(icon.color)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,10 @@ class BPKSearchInputSummaryTests: XCTestCase {
.inputState(.error)
.frame(width: 300))
}

func test_accessibility() {
let searchInput = BPKSearchInputSummary(inputPrefix: .icon(.search), .constant("Value"))
.frame(width: 300)
assertA11ySnapshot(searchInput)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a0a2ed6

Please sign in to comment.