-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve some accessibility modifiers, add Text, LocalizedStrin…
…g, and Label structures
- Loading branch information
Showing
28 changed files
with
757 additions
and
115 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
Sources/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AccessibilityActionResult.swift
This file contains 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,6 @@ | ||
import Foundation | ||
|
||
public struct AccessibilityActionResult { | ||
public init() { | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...ces/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AccessibilityActionStorage.swift
This file contains 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,19 @@ | ||
import Foundation | ||
|
||
class AccessibilityActionStorage<Value> : AnyAccessibilityAction { | ||
var action: Value | ||
var category: AccessibilityActionCategory? | ||
var label: Text? | ||
var image: Image? | ||
var handler: Any? | ||
var seed: Int | ||
|
||
init(action: Value, category: AccessibilityActionCategory?, label: Text?, image: Image?, handler: Any?, seed: Int) { | ||
self.action = action | ||
self.category = category | ||
self.label = label | ||
self.image = image | ||
self.handler = handler | ||
self.seed = seed | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Sources/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AccessibilityAttachment.swift
This file contains 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,11 @@ | ||
import Foundation | ||
|
||
public struct AccessibilityAttachment { | ||
var properties: AccessibilityProperties | ||
var platformElement: (any PlatformAccessibilityElementProtocol)? | ||
|
||
init(properties: AccessibilityProperties, platformElement: (any PlatformAccessibilityElementProtocol)?) { | ||
self.properties = properties | ||
self.platformElement = platformElement | ||
} | ||
} |
This file contains 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
9 changes: 9 additions & 0 deletions
9
Sources/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AccessibilityProperties.swift
This file contains 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,9 @@ | ||
import Foundation | ||
|
||
class AccessibilityProperties { | ||
let storage: [ObjectIdentifier: Any] | ||
|
||
init(storage: [ObjectIdentifier: Any]) { | ||
self.storage = storage | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...s/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AccessibilityPropertiesEntry.swift
This file contains 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,9 @@ | ||
import Foundation | ||
|
||
class AccessibilityPropertiesEntry<Value> { | ||
let typedValue: Value | ||
|
||
init(typedValue: Value) { | ||
self.typedValue = typedValue | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Sources/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AccessibilityScrollAction.swift
This file contains 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,6 @@ | ||
import Foundation | ||
|
||
struct AccessibilityScrollAction { | ||
init() { | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Sources/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AccessibilityVoidAction.swift
This file contains 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,9 @@ | ||
import Foundation | ||
|
||
class AccessibilityVoidAction { | ||
var kind: AccessibilityActionKind | ||
|
||
init(kind: AccessibilityActionKind) { | ||
self.kind = kind | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
Sources/OpenSwiftUI/Accessibility/Accessibility Fundamentals/AnyAccessibilityAction.swift
This file contains 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,5 @@ | ||
import Foundation | ||
|
||
class AnyAccessibilityAction { | ||
var bridged: Bool = false | ||
} |
4 changes: 4 additions & 0 deletions
4
...iftUI/Accessibility/Accessibility Fundamentals/PlatformAccessibilityElementProtocol.swift
This file contains 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,4 @@ | ||
import Foundation | ||
|
||
protocol PlatformAccessibilityElementProtocol { | ||
} |
This file contains 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 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 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
9 changes: 9 additions & 0 deletions
9
Sources/OpenSwiftUI/Accessibility/Accessible Controls/AccessibilityAdjustableAction.swift
This file contains 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,9 @@ | ||
import Foundation | ||
|
||
class AccessibilityAdjustableAction : AnyAccessibilityAction { | ||
var continuous: Bool? | ||
|
||
init(continuous: Bool?) { | ||
self.continuous = continuous | ||
} | ||
} |
Oops, something went wrong.