-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ef3932
commit 6c6d1c6
Showing
26 changed files
with
186 additions
and
537 deletions.
There are no files selected for viewing
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
82 changes: 0 additions & 82 deletions
82
.../Adaption/Advanced/AccessibleControls/AdjustableElements/aAdjustableElements.md
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
...ages/Adaption/Advanced/AccessibleControls/AdjustableElements/aAdjustableElements.tutorial
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,68 @@ | ||
@Article(time: 20) { | ||
|
||
@Intro(title: "Adjustable Elements") { | ||
} | ||
@Comment { | ||
Simplifies interactions with complex elements for VoiceOver. | ||
|
||
> Tip: | ||
> - Best for VoiceOver, is changed by vertical swipe | ||
> - Avoid at Voice Control | ||
> - Replace by ``Book/accessibilityNavigationStyle`` for Switch Control | ||
|
||
## Overview | ||
|
||
By default any element can contain ``UIAccessibilityTraits_/adjustable`` trait to expose additional data for user. Some elements come complicated and can contain dynamic value, controlled by vertical swipe. Examples: | ||
- Slider | ||
- Stepper | ||
- Any horizontal carousel | ||
|
||
> Note: After vertical swipe reads only the new value, a label is omitted to avoid repeatness. | ||
|
||
Tutorial <doc:AdjustableTutorial> for detailed explanation. | ||
|
||
### How to setup | ||
|
||
- Accessible element can be marked by ``UIAccessibilityTraits_/adjustable`` trait to make ``Book/accessibilityValue`` dynamic. | ||
- As a result the element will react on vertical swipe by calling ``Book/accessibilityIncrement()`` and ``Book/accessibilityDecrement()``. | ||
- After each swipe the ``Book/accessibilityValue`` getter will be reread and the new value will be spoken out. | ||
|
||
### Enable adjustable only for VoiceOver | ||
|
||
> Important: Adjustable elements is useful only for VoiceOver and will brake behaviour for Voice Control and Switch Control. | ||
|
||
Distinguish behaviour in code by dynamic getter: | ||
|
||
``` | ||
var isAccessibilityElement: Bool { | ||
UIAccessibility.isVoiceOverRunning | ||
} | ||
|
||
var accessibilityTraits: UIAccessibilityTraits { | ||
if UIAccessibility.isVoiceOverRunning { | ||
return [.adjustable] | ||
} else { | ||
return .none | ||
} | ||
} | ||
``` | ||
|
||
### Selection follow focus | ||
|
||
@Comment { | ||
// TODO: Selection follow focus | ||
// TODO: Visual Samples | ||
} | ||
|
||
### `button` and `adjustable` | ||
|
||
@Comment { | ||
// TODO: Stories sample | ||
} | ||
|
||
### Tutorial | ||
|
||
See tutorial <doc:AdjustableTutorial> | ||
} | ||
} | ||
} |
48 changes: 0 additions & 48 deletions
48
...lityHandbook.docc/Pages/Adaption/Advanced/AccessibleControls/aVerticalSwipes.md
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...sibilityHandbook.docc/Pages/Adaption/Advanced/AccessibleControls/aVerticalSwipes.tutorial
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,33 @@ | ||
@Article(time: 20) { | ||
@Intro(title: "User scenarios for vertical swipes") { | ||
Vertical swipe have a lot of possible actions and all of them depends on focus'es context. | ||
|
||
## Overview | ||
|
||
Previously we discussed how to add vertical swipe to any element at <doc:AdjustableElements> and <doc:AdjustableElements>. But vertical swipe is so easy to do and can have a lot of other actions. | ||
|
||
### Custom action | ||
|
||
Context actions | ||
|
||
#### Custom action in Voice Control and Switch Control | ||
|
||
Provide icon | ||
|
||
### Custom description | ||
|
||
Secondary description | ||
|
||
### Rotor | ||
|
||
Choose action for vertical swipe | ||
|
||
### Navigation | ||
|
||
A lot of navigation model | ||
|
||
### Text input | ||
|
||
See <doc:TextInput> | ||
} | ||
} |
22 changes: 4 additions & 18 deletions
22
...on/Basic/Connect/Navigation/Navigation.md → ...ic/Connect/Navigation/Navigation.tutorial
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
22 changes: 4 additions & 18 deletions
22
...Navigation/On-Screen/aControlHierarchy.md → ...tion/On-Screen/aControlHierarchy.tutorial
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
Oops, something went wrong.