Skip to content

Commit

Permalink
styled file names, minor fixes, resources at their place
Browse files Browse the repository at this point in the history
  • Loading branch information
crescentheaded committed Feb 12, 2024
1 parent 38ddf39 commit ae069eb
Show file tree
Hide file tree
Showing 69 changed files with 252 additions and 247 deletions.
8 changes: 0 additions & 8 deletions Sources/iOSAccessibilityHandbook/EmtpyFileToFixBuild.swift

This file was deleted.

3 changes: 3 additions & 0 deletions Sources/iOSAccessibilityHandbook/empty.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This file exists for building the Swift package.

import Foundation
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

@TutorialReference(tutorial: "doc:ColorsAndShapes")
@TutorialReference(tutorial: "doc:DynamicType")
@TutorialReference(tutorial: "doc:AdaptedPrivacy")
}
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
@Tutorial(time: 10) {
@Intro(title: "Setting Up Adjustable Elements") {
Simplifies interactions with complex elements for VoiceOver.
}

@Comment {
@Section(title: "Basic Setup") {
@ContentAndMedia {
By default any element can contain ``Book/accessibilityValue`` to expose *additional data* to user. Some elements come complicated and may contain a *dynamic value* controlled by a vertical swipe. Here some examples:
}

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

@Code(name: "", file: "AdjustableTutorialStep_1.swift")
}

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

@Code(name: "", file: "AdjustableTutorialStep_2.swift")
}

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

After each swipe the ``Book/accessibilityValue`` getter will be read again and the next value will be vocalised.

> Note: `AccessibilityLabel wouldn't be read again after swipe`

@Code(name: "", file: "AdjustableTutorialStep_3.swift")
}
}
}

@Section(title: "Backward Compatibility") {
@ContentAndMedia {
Voice Control and Switch Control work with separate *buttons* instead of *adjustable elements*.
}

@Steps {
@Step {
> Important: Adjustable elements are only used for VoiceOver and will break the behaviour of Voice Control and Switch Control.

Distinguish their behaviour in code by a dynamic getter:

@Code(name: "", file: "AdjustableTutorialStep_4.swift")
}

@Step {
Switch Control requires grouping: firstly focus will be placed on the group itself, afterwards the selection will be moved between elements of this group. It simulates navigation by reducing the number of elements on each level.

> Note: Watch video [How Grouping Simplifies Navigation](https://youtube.com/shorts/1l8H615EkV0?si=tKyhIGjBbR9XG9HP)

@Code(name: "", file: "AdjustableTutorialStep_5.swift")
}
}
}

@Assessments {
@MultipleChoice {
What **Accessibility Features** use adjustable trait?

@Choice(isCorrect: false) {
Switch Control


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

@Choice(isCorrect: true) {
VoiceOver


@Justification(reaction: "That's right!") {
Blind people would like to have a reduced number of elements on the screen and simplified interactions by vertical swipes to adjust the value of the element.
}
}

@Choice(isCorrect: false) {
Voice Control


@Justification(reaction: "Try again!") {
Voice Control is mostly used by people who are able to see. In such case percieving elements as separate buttons is preferred.
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@Tutorial(time: 5) {
@Intro(title: "Protect User's Confidential Information") {
<#text#>

@Image(source: <#file#>, alt: "<#accessible description#>")
}

@Section(title: "<#text#>") {
@ContentAndMedia {
<#text#>

@Image(source: <#file#>, alt: "<#accessible description#>")
}

@Steps {
@Step {
<#text#>

@Image(source: <#file#>, alt: "<#accessible description#>")
}

@Step {
<#text#>

@Code(name: "<#display name#>", file: <#filename.swift#>)
}
}
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit ae069eb

Please sign in to comment.