Skip to content

Commit

Permalink
BPKHorizontal navigation Accessibility fix (#1629)
Browse files Browse the repository at this point in the history
* Fix accessibility issue

* fix ui-test
  • Loading branch information
gert-janvercauteren committed Apr 14, 2023
1 parent 66ea754 commit 858fc12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ public class BPKHorizontalNavigation<Size: BPKHorizontalNavigationSize>: UIContr
heightAnchor.constraint(equalTo: scrollView.heightAnchor),
bottomAnchor.constraint(equalTo: barView.bottomAnchor)
])

self.accessibilityTraits.insert(.tabBar)

repopulateStackView()
self.selectedItemIndex = selectedItemIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import XCTest

class HorizontalNavigationUITest: BackpackUITestCase {
lazy var flightsOption: XCUIElement = {
return app.buttons["Flights"]
return app.buttons["Flights"].firstMatch
}()

lazy var hotelsOption: XCUIElement = {
return app.buttons["Hotels"]
return app.buttons["Hotels"].firstMatch
}()

func navigateAndShow() {
Expand Down

0 comments on commit 858fc12

Please sign in to comment.