-
-
Notifications
You must be signed in to change notification settings - Fork 84
test(accessibility): Add navigation chrome fixtures #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cameroncooke
merged 1 commit into
main
from
cameroncooke/test/navigation-chrome-fixtures
May 11, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
AxePlaygroundApp/AxePlayground/Views/AccessibilityFixturesView.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| import SwiftUI | ||
|
|
||
| struct SliderValueTestView: View { | ||
| @State private var sliderValue = 0.25 | ||
| @State private var state = "Initial" | ||
|
|
||
| var body: some View { | ||
| VStack(spacing: 24) { | ||
| Text("Slider Value State: \(state)") | ||
| .accessibilityIdentifier("slider-value-state") | ||
| .accessibilityValue(state) | ||
|
|
||
| Button("Slider Value Button") { | ||
| state = "Tapped" | ||
| } | ||
| .buttonStyle(.borderedProminent) | ||
| .accessibilityIdentifier("slider-value-button") | ||
|
|
||
| Text("Slider Position: \(sliderValue.formatted(.number.precision(.fractionLength(2))))") | ||
| .accessibilityIdentifier("slider-position-value") | ||
| .accessibilityValue(sliderValue.formatted(.number.precision(.fractionLength(2)))) | ||
|
|
||
| Slider(value: $sliderValue, in: 0...1) | ||
| .accessibilityIdentifier("slider-value-slider") | ||
| .accessibilityLabel("Slider Value Slider") | ||
| } | ||
| .padding() | ||
| .navigationTitle("Slider Value") | ||
| .navigationBarTitleDisplayMode(.inline) | ||
| } | ||
| } | ||
|
|
||
| struct SearchableTestView: View { | ||
| @State private var query = "" | ||
|
|
||
| private var rows: [String] { | ||
| let allRows = ["Alpha Row", "Beta Row"] | ||
| guard !query.isEmpty else { return allRows } | ||
| return allRows.filter { $0.localizedCaseInsensitiveContains(query) } | ||
| } | ||
|
|
||
| var body: some View { | ||
| List { | ||
| Text("Search Query: \(query.isEmpty ? "empty" : query)") | ||
| .accessibilityIdentifier("searchable-test-query") | ||
| .accessibilityValue(query.isEmpty ? "empty" : query) | ||
|
|
||
| ForEach(rows, id: \.self) { row in | ||
| Text(row) | ||
| .accessibilityIdentifier("searchable-test-\(row.replacingOccurrences(of: " ", with: "-").lowercased())") | ||
| } | ||
| } | ||
| .navigationTitle("Searchable Test") | ||
| .navigationBarTitleDisplayMode(.large) | ||
| .searchable( | ||
| text: $query, | ||
| placement: .navigationBarDrawer(displayMode: .always), | ||
| prompt: "Search Books" | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| struct ToolbarPickerTestView: View { | ||
| private enum Filter: String, CaseIterable, Identifiable { | ||
| case all = "All" | ||
| case unread = "Unread" | ||
| case read = "Read" | ||
|
|
||
| var id: String { rawValue } | ||
| } | ||
|
|
||
| @State private var filter: Filter = .all | ||
|
|
||
| var body: some View { | ||
| List { | ||
| Text("Toolbar Picker State: \(filter.rawValue)") | ||
| .accessibilityIdentifier("toolbar-picker-test-state") | ||
| .accessibilityValue(filter.rawValue) | ||
|
|
||
| Text("Toolbar Picker Detail Body") | ||
| .accessibilityIdentifier("toolbar-picker-test-body") | ||
| } | ||
| .navigationTitle("Toolbar Picker") | ||
| .navigationBarTitleDisplayMode(.inline) | ||
| .toolbar { | ||
| ToolbarItem(placement: .topBarTrailing) { | ||
| Picker("Filter", selection: $filter) { | ||
| ForEach(Filter.allCases) { filter in | ||
| Text(filter.rawValue).tag(filter) | ||
| } | ||
| } | ||
| .pickerStyle(.segmented) | ||
| .accessibilityIdentifier("toolbar-picker-test-filter") | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add issue links to match internal changelog entry format.
This new internal fix entry should include issue references in the required format.
Suggested update
As per coding guidelines,
For internal changes from issues, use format Fixed foo bar ([#123](https://github.com/cameroncooke/AXe/issues/123)).📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[uncategorized] ~12-~12: Possible missing comma found.
Context: ...the CoreSimulator accessibility bridge. Also fixed selector decoding when the access...
(AI_HYDRA_LEO_MISSING_COMMA)
🤖 Prompt for AI Agents