Skip to content

Commit

Permalink
Add tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
akaDuality committed Dec 9, 2023
1 parent 8721a4a commit ba8dc58
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,46 +1,36 @@
@Tutorial(time: 2) {
@Tutorial(time: 10) {
@Intro(title: "Describe adjustable elements") {
Simplifies interactions with a complex element for VoiceOver.

> Tip:
> - Best for VoiceOver, is changed by vertical swipe
> - Avoid at Voice Control
> - Replace by ``Book/accessibilityNavigationStyle`` for Switch Control
}

@Section(title: "Basic setup") {
@ContentAndMedia {
By default any element can contains ``Book/accessibilityValue`` 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.
}

@Steps {
@Step {
Accessible element can be marked by ``UIAccessibilityTraits_/adjustable`` trait to make ``Book/accessibilityValue`` dynamic.

@Code(name: "", file: "AdjustableTutorialStep1")
@Code(name: "", file: "AdjustableTutorialStep_1")
}

@Step {
Accessible element can be marked by ``UIAccessibilityTraits_/adjustable`` trait to make ``Book/accessibilityValue`` dynamic.

@Code(name: "", file: "AdjustableTutorialStep2")
@Code(name: "", file: "AdjustableTutorialStep_2")
}

@Step {`
As a result the element will react on vertical swipe by calling ``Book/accessibilityIncrement()`` and ``Book/accessibilityDecrement()``.

@Code(name: "", file: "AdjustableTutorialStep3")
@Code(name: "", file: "AdjustableTutorialStep_3")
}

@Step {
After each swipe the ``Book/accessibilityValue`` getter will be reread and the new value will be spoken out.

@Code(name: "", file: "AdjustableTutorialStep3")
@Code(name: "", file: "AdjustableTutorialStep_3")
}
}
}
Expand All @@ -56,13 +46,47 @@

Distinguish behaviour in code by dynamic getter:

@Code(name: "", file: "AdjustableTutorialStep4")
@Code(name: "", file: "AdjustableTutorialStep_4")
}

@Step {
Switch Control requires grouping

@Code(name: "", file: "AdjustableTutorialStep5")
@Code(name: "", file: "AdjustableTutorialStep_5")
}
}
}

@Assessments {
@MultipleChoice {
What assistive technologies uses adjustable trait

@Choice(isCorrect: false) {
Switch Control


@Justification(reaction: "Try again!") {
Switch Controls requires grouping, to simplify navigation, but uses ``Book/accessibilityNavigationStyle`` for that.
}
}


@Choice(isCorrect: true) {
VoiceOver


@Justification(reaction: "That's right!") {
Blind person would like to reduce number of elements on screen and simplify interactions by vertical swipe to adjust the value of the element
}
}

@Choice(isCorrect: false) {
Voice Control


@Justification(reaction: "Try again!") {
Voice Control uses person who can see and they prefer to see elements as separate buttons
}
}
}
}
Expand Down

0 comments on commit ba8dc58

Please sign in to comment.