diff --git a/Sources/iOSAccessibilityHandbook/EmtpyFileToFixBuild.swift b/Sources/iOSAccessibilityHandbook/EmtpyFileToFixBuild.swift deleted file mode 100644 index 08a7086..0000000 --- a/Sources/iOSAccessibilityHandbook/EmtpyFileToFixBuild.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// File.swift -// -// -// Created by Mikhail Rubanov on 10.02.2024. -// - -import Foundation diff --git a/Sources/iOSAccessibilityHandbook/empty.swift b/Sources/iOSAccessibilityHandbook/empty.swift new file mode 100644 index 0000000..d009ebb --- /dev/null +++ b/Sources/iOSAccessibilityHandbook/empty.swift @@ -0,0 +1,3 @@ +// This file exists for building the Swift package. + +import Foundation diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/AdaptionStrategy.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/AdaptionStrategy.tutorial index 71abaec..84cd6b5 100644 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/AdaptionStrategy.tutorial +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/AdaptionStrategy.tutorial @@ -95,6 +95,7 @@ @TutorialReference(tutorial: "doc:ColorsAndShapes") @TutorialReference(tutorial: "doc:DynamicType") + @TutorialReference(tutorial: "doc:AdaptedPrivacy") } } diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/SpecificProperties/Charts.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/SpecificProperties/Charts/Charts.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/SpecificProperties/Charts.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/SpecificProperties/Charts/Charts.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements.tutorial deleted file mode 100644 index 3c0d907..0000000 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements.tutorial +++ /dev/null @@ -1,92 +0,0 @@ -@Tutorial(time: 10) { - @Intro(title: "Setting Up Adjustable Elements") { - Simplifies interactions with complex elements for VoiceOver. - } - - @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. - } - } - } - } -} diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/AdjustableElements.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/AdjustableElements.tutorial new file mode 100644 index 0000000..118cd05 --- /dev/null +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/AdjustableElements.tutorial @@ -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. + } + } + } + } + } +} diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_1.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_1.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_1.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_1.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_2.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_2.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_2.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_2.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_3.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_3.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_3.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_3.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_4.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_4.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_4.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_4.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_5.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_5.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Adjustable/AdjustableTutorialStep_5.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/Resources/AdjustableTutorialStep_5.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/aAdjustableElements.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/aAdjustableElements.md similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/aAdjustableElements.md rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VerticalSwipes/AdjustableElements/aAdjustableElements.md diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VisualProperties/AdaptedPrivacy.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VisualProperties/AdaptedPrivacy.tutorial new file mode 100644 index 0000000..71e2239 --- /dev/null +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VisualProperties/AdaptedPrivacy.tutorial @@ -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#>) + } + } + } +} diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/VisualProperties/ColorsAndShapes.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VisualProperties/ColorsAndShapes.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/VisualProperties/ColorsAndShapes.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VisualProperties/ColorsAndShapes.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/VisualProperties/DynamicType.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VisualProperties/DynamicType.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/VisualProperties/DynamicType.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Advanced/VisualProperties/DynamicType.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/Traits.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/Traits.tutorial deleted file mode 100644 index 6f8a845..0000000 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/Traits.tutorial +++ /dev/null @@ -1,17 +0,0 @@ -@Tutorial(time: 20) { - @Intro(title: "🔒 Traits") { - - } - - @Section(title: "<#text#>") { - @ContentAndMedia { - <#text#> - } - - @Steps { - @Step { - <#Work in progress#> - } - } - } -} diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/Navigation.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/Navigation.md deleted file mode 100644 index a4d7044..0000000 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/Navigation.md +++ /dev/null @@ -1,96 +0,0 @@ -# Navigation - -To simplify navigation developer had to achieve several goals: call a notification to update accessibility tree, manage focus when a new screen is opened, support action for closing or completing the screen. - -## Overview - -Text - -### Notifications - -Notifications is mechanism to keep in sync current view hierarchy with accessibility tree. Every time when you update your UI you should call proper notification. Hopefully, some of them is called automatically. - -@Links(visualStyle: list) { - - ``Book/announcement`` - - ``Book/screenChanged`` - - ``Book/layoutChanged`` - - ``Book/pageScrolled`` - - ``Book/pauseAssistiveTechnology`` - - ``Book/resumeAssistiveTechnology`` -} - -### Modal view -``Book/accessibilityViewIsModal`` - -Set this property to any modal view to limit focus movement by this view. - -Modal view should done three main things: -- Limit focus movement by himself. To mark a node as modal we use property ``Book/accessibilityViewIsModal``. -- Set focus to the first element by posting ``Book/post(notification:argument:)`` with type `.screenChanged` and set focus to first onscreen element. -- Support escape gesture to close the screen by adding function ``Book/accessibilityPerformEscape()`` to first responder - -@Comment { - // TODO: Add link to notification - // TODO: Add Product Card tutorial -} - -### Escape gesture - -``Book/accessibilityPerformEscape()`` - -Escape gesture allows to close current screen by special gesture without focusing on "close" button. -- **For macOS app** it happened by *pressing "esc" button*, -- **For VoiceOver** you should swipe by *two finger up and down on screen several times like drawing N-symbol*. - - -@Comment { - // TODO: Add escape gesture video - // Do Switch Control and Voice Control have support for this gesture? Can't find it for Switch Control - // TODO: Check https://developer.apple.com/library/archive/featuredarticles/ViewControllerPGforiPhoneOS/SupportingAccessibility.html -} - -To handle escape gesture on your view you should override default implementation: - -``` -class ProductCardViewController: UIViewController { - override func accessibilityPerformEscape() -> Bool { - ingredientsCustomizationPopover.removeFromSuperView() // <- Call your type function - return true - } -} -``` - -> Note: Default modal and push navigation already supported escape gesture, but if you create your own custom navigation or modal screen you should implement escape function manually - -### Magic tap - -``Book/accessibilityPerformMagicTap()`` - -User can call "magic tap" gesture to perform main operation on the screen. Examples: -- Phone app: picks up or hangs up a call -- Clock app: start or stop a stopwatch -- Product card in food ordering app: add to cart -- Cart in food ordering app: create an order -- Taxi app: order a ride -- Focused textfield: start dictation - -**VoiceOver** allows to *tap twice by two finger* in any place on the screen to perform magic tap -@Comment { - // TODO: how to call by switch control and voice control? -} - -> Important: The action after magic tap gesture should be obvious to a user: absolutely nothing tell to user what action will be triggered. You can add hint to main button on screen that this button can be triggered by magic tap, but user offen distable hints, check for more details - -### Container - -### Switch control and grouping - -#### VoiceOver supports grouping - -@Comment { - // TODO: Check VoiceOver grouping -} - -## Topics -- -- diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/Between-ScreensNavigation.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/Between-ScreensNavigation.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/Between-ScreensNavigation.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/Between-ScreensNavigation.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/Containers.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/Containers.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/Containers.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/Containers.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/ControlHierarchy.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/ControlHierarchy.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/ControlHierarchy.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/ControlHierarchy.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/FocusOrder.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/FocusOrder.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/FocusOrder.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/FocusOrder.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/Navigation.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/Navigation.md new file mode 100644 index 0000000..8f10ff7 --- /dev/null +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/Navigation.md @@ -0,0 +1,98 @@ +# Navigation + +@Comment { + To simplify navigation developer had to achieve several goals: call a notification to update accessibility tree, manage focus when a new screen is opened, support action for closing or completing the screen. + + ## Overview + + Text + + ### Notifications + + Notifications is mechanism to keep in sync current view hierarchy with accessibility tree. Every time when you update your UI you should call proper notification. Hopefully, some of them is called automatically. + + @Links(visualStyle: list) { + - ``Book/announcement`` + - ``Book/screenChanged`` + - ``Book/layoutChanged`` + - ``Book/pageScrolled`` + - ``Book/pauseAssistiveTechnology`` + - ``Book/resumeAssistiveTechnology`` + } + + ### Modal view + ``Book/accessibilityViewIsModal`` + + Set this property to any modal view to limit focus movement by this view. + + Modal view should done three main things: + - Limit focus movement by himself. To mark a node as modal we use property ``Book/accessibilityViewIsModal``. + - Set focus to the first element by posting ``Book/post(notification:argument:)`` with type `.screenChanged` and set focus to first onscreen element. + - Support escape gesture to close the screen by adding function ``Book/accessibilityPerformEscape()`` to first responder + + @Comment { + // TODO: Add link to notification + // TODO: Add Product Card tutorial + } + + ### Escape gesture + + ``Book/accessibilityPerformEscape()`` + + Escape gesture allows to close current screen by special gesture without focusing on "close" button. + - **For macOS app** it happened by *pressing "esc" button*, + - **For VoiceOver** you should swipe by *two finger up and down on screen several times like drawing N-symbol*. + + + @Comment { + // TODO: Add escape gesture video + // Do Switch Control and Voice Control have support for this gesture? Can't find it for Switch Control + // TODO: Check https://developer.apple.com/library/archive/featuredarticles/ViewControllerPGforiPhoneOS/SupportingAccessibility.html + } + + To handle escape gesture on your view you should override default implementation: + + ``` + class ProductCardViewController: UIViewController { + override func accessibilityPerformEscape() -> Bool { + ingredientsCustomizationPopover.removeFromSuperView() // <- Call your type function + return true + } + } + ``` + + > Note: Default modal and push navigation already supported escape gesture, but if you create your own custom navigation or modal screen you should implement escape function manually + + ### Magic tap + + ``Book/accessibilityPerformMagicTap()`` + + User can call "magic tap" gesture to perform main operation on the screen. Examples: + - Phone app: picks up or hangs up a call + - Clock app: start or stop a stopwatch + - Product card in food ordering app: add to cart + - Cart in food ordering app: create an order + - Taxi app: order a ride + - Focused textfield: start dictation + + **VoiceOver** allows to *tap twice by two finger* in any place on the screen to perform magic tap + @Comment { + // TODO: how to call by switch control and voice control? + } + + > Important: The action after magic tap gesture should be obvious to a user: absolutely nothing tell to user what action will be triggered. You can add hint to main button on screen that this button can be triggered by magic tap, but user offen distable hints, check for more details + + ### Container + + ### Switch control and grouping + + #### VoiceOver supports grouping + + @Comment { + // TODO: Check VoiceOver grouping + } + + ## Topics + - + - +} diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/OnScreen-Navigation.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/OnScreen-Navigation.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/OnScreen-Navigation.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/OnScreen-Navigation.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/aControlHierarchy.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/aControlHierarchy.md similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/3..Navigation/aControlHierarchy.md rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Connect/aControlHierarchy.md diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/AdaptCells.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/AdaptCells.tutorial similarity index 94% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/AdaptCells.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/AdaptCells.tutorial index dda31af..f9438bd 100644 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/AdaptCells.tutorial +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/AdaptCells.tutorial @@ -19,7 +19,7 @@ @ContentAndMedia { Even though the cell looks simple it is not enough — such layout would lead to several *accessibility issues*. Let's see **how exactly different Accessibility Features *struggle* with that**. - @Image(source: "Chicken BBQ", alt: "Cell of Chicken BBQ containing an image, a title, ingredients and a price.") + @Image(source: "chicken-bbq", alt: "Cell of Chicken BBQ containing an image, a title, ingredients and a price.") } @Steps { @@ -30,13 +30,13 @@ > Note: Pay attention that **images are hidden from VoiceOver *by default***, therefore are *inaccessible* to be focused on. - @Image(source: "DescribeCell_1", alt: "Focus outlines the title of the cell first.") + @Image(source: "chicken-bbq-label", alt: "Focus outlines the title of the cell first.") } @Step { After a swipe to the right (which triggers **moving to the next element**) the focus moves to **the list of ingredients**. - @Image(source: "DescribeCell_2", alt: "In our case, secondly the focus outlines the ingredients' list.") + @Image(source: "chicken-bbq-value", alt: "In our case, secondly the focus outlines the ingredients' list.") } @Step { @@ -44,7 +44,7 @@ > Note: The *only* possibility **for a user to understand that this element is interactive by hearing VoiceOver say that's it's a *button***. It can be made possible by **specifying its `.button` *trait***. - @Image(source: "DescribeCell_3", alt: "Consequently the focus outlines the button with the price.") + @Image(source: "chicken-bbq-price", alt: "Consequently the focus outlines the button with the price.") } @Step { @@ -75,7 +75,7 @@ > Tip: The solution here is to **use *the title* as the cell's *label***. - @Image(source: "DescribeCell_4", alt: "Voice Control shows the badge over the button with the price") + @Image(source: "chicken-bbq-price-pronounciation", alt: "Voice Control shows the badge over the button with the price") } } } @@ -86,7 +86,7 @@ In order to **properly *describe* the cell so VoiceOver can read it correctly** we have to transfer the text from *labels* to the *accessibility description* of the cell in a *correct order* and with a *correct type*. Let's try to do so. - @Image(source: "DescribeCell_9_preview", alt: "Order in which elements are read is controlled by designers' vision.") + @Image(source: "chicken-bbq-priority", alt: "Order in which elements are read is controlled by designers' vision.") } @Steps { @@ -99,9 +99,7 @@ @Step { First of all we have to **specify that the cell will be a *focusable element***. By doing that we ***reduce* the number of elements available on the screen**, which is, as you remember from the previous section, really helpful for *adaption*. - There is no need to *explicitly* hide other elements - setting the cell with `accessibleElements` property is enough. - - To see **how it works *exactly*** take a look at where everything is explained in *greater* detail than we can afford in *tutorials*. + There is no need to *explicitly* hide other elements - setting the cell with `accessibleElements` property is enough. To see **how it works *exactly*** take a look at where everything is explained in *greater* detail than we can afford in *tutorials*. @Comment { // TODO: why the cell's button is visible at pizza? diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_10.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_10.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_10.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_10.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_11.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_11.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_11.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_11.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_11_0.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_11_0.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_11_0.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_11_0.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_12.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_12.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_12.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_12.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_13.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_13.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_13.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_13.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_14.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_14.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_14.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_14.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_15.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_15.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_15.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_15.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_16.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_16.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_16.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_16.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_0.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_3_0.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_0.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_3_0.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_1.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_3_1.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_1.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_3_1.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_2.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_3_2.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_2.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_3_2.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_6.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_6.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_6.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_6.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_7.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_7.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_7.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_7.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_8.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_8.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_8.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_8.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_9.swift b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_9.swift similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_9.swift rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Code/DescribeCell_9.swift diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_9_preview.jpeg b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/cell-priority.jpeg similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_9_preview.jpeg rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/cell-priority.jpeg diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_5.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-cell.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_5.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-cell.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_1.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-label.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_1.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-label.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_4.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-price-pronounciation.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_4.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-price-pronounciation.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-price.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-price.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_2.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-value.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_2.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq-value.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/Chicken BBQ.PNG b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/Chicken BBQ.PNG rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/chicken-bbq.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_3.jpeg b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/menu.jpeg similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/AdaptingCell/DescribeCell_3_3.jpeg rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/AdaptCells/Resources/Images/menu.jpeg diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/DescribeElements.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/DescribeElements/DescribeElements.tutorial similarity index 98% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/DescribeElements.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/DescribeElements/DescribeElements.tutorial index e7cb45c..6036f79 100644 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/1.Description/DescribeElements.tutorial +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/DescribeElements/DescribeElements.tutorial @@ -37,12 +37,6 @@ @Image(source: chapter-placeholder.png, alt: "") } - - @Step { - Надо еще примеров че как подписыывается: текст есть, еще надо кнопку, картинку - - @Image(source: placeholder-image.png, alt: "") - } } } @@ -250,7 +244,7 @@ Тут надо раскрыть, что на описание еще могут влиять другие трейты и контейнеры, но об этом позже } - @Image(source: TraitsOrder.png, alt: "") + @Image(source: attributes-order, alt: "") } } @Assessments { diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/DescribeElements/TraitsOrder.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/DescribeElements/Resources/attributes-order.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/DescribeElements/TraitsOrder.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Describe/DescribeElements/Resources/attributes-order.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/2.Reduce/HideUselessControls.tutorial b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Simplify/HideUselessControls.tutorial similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/2.Reduce/HideUselessControls.tutorial rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/AdaptionTechniques/Essentials/Simplify/HideUselessControls.tutorial diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/SwitchControlOverview.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/Resources/switch-control-overview.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/SwitchControlOverview.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/Resources/switch-control-overview.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/Switch Control Preview.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/Resources/switch-control-picker-example.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/Switch Control Preview.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/Resources/switch-control-picker-example.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/SwitchControl.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/SwitchControl.md index f965be1..876a9a4 100644 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/SwitchControl.md +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/SwitchControl/SwitchControl.md @@ -3,14 +3,14 @@ @Metadata { @PageImage( purpose: card, - source: "Switch Control Preview", + source: "switch-control-picker-example", alt: "Switch Control with opened popover with actions: Select All, Deselect, Cut, Copy") } Allows to connect external devices and link them to any command. As a result paralyzed people can control a phone by simple signals: finger movement, muscle stretches, etc. Also, a iPhone's camera can recognize facial expression or any sound like a command. In the end user moves focus on screen and pass command to focused element by submenu that is presented after selection. -![Switch Control modes: focus groups on elements, cross selection and submenu](SwitchControlOverview) +![Switch Control modes: focus groups on elements, cross selection and submenu](switch-control-overview) ## How to setup diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceControlOverview.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/Resources/voice-control-overview.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceControlOverview.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/Resources/voice-control-overview.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/Voice Control Preview.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/Resources/voice-control-picker-example.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/Voice Control Preview.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/Resources/voice-control-picker-example.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/VoiceControl.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/VoiceControl.md index 222f9b4..2ddd321 100644 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/VoiceControl.md +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceControl/VoiceControl.md @@ -5,13 +5,13 @@ Adds additional commands over graphical UI to control a phone by voice commands. @Metadata { @PageImage( purpose: card, - source: "Voice Control Preview", - alt: "Switch Control with opened popover with actions: Select All, Deselect, Cut, Copy") + source: "voice-control-picker-example", + alt: "") } ## Overview -![Voice Control modes: with labels, enumerated elements or grid](VoiceControlOverview) +![Voice Control modes: with labels, enumerated elements or grid](voice-control-picker-example) [Video how to use Voice Control](https://www.youtube.com/watch?v=eg22JaZWAgs) diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/VoiceOver/ScreenAsTrackPad.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/Resources/screen-as-trackPad.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/VoiceOver/ScreenAsTrackPad.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/Resources/screen-as-trackPad.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/VoiceOver/VoiceOverGestures.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/Resources/voiceOver-gestures.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/VoiceOver/VoiceOverGestures.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/Resources/voiceOver-gestures.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOver Preview.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/Resources/voiceOver-picker-example.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOver Preview.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/Resources/voiceOver-picker-example.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/VoiceOver.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/VoiceOver.md index 1fd93ef..709ebcd 100644 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/VoiceOver.md +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/VoiceOver/VoiceOver.md @@ -5,12 +5,12 @@ Helps blind or low-visioned persons to use a phone by listening audio descriptio @Metadata { @PageImage( purpose: card, - source: "VoiceOver Preview", - alt: "Switch Control with opened popover with actions: Select All, Deselect, Cut, Copy") + source: "voiceOver-picker-example", + alt: "") } ## Overview -![VoiceOver gestures](VoiceOverGestures) +![VoiceOver gestures](voiceOver-gestures) [Video how to navigate by VoiceOver](https://www.youtube.com/watch?v=qDm7GiKra28) diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/DifferentTechnologies.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/accessible-drinkit.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/DifferentTechnologies.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/Introduction/AccessibilityFeatures/accessible-drinkit.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/iOSAccessibilityHandbook.md b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/iOSAccessibilityHandbook.md index 6d98355..8b5fa96 100644 --- a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/iOSAccessibilityHandbook.md +++ b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Pages/iOSAccessibilityHandbook.md @@ -13,15 +13,16 @@ Make your iOS application accessible for everyone with help of interactive guide ## — What is this? -iOS Accessibility Handbook is an open-source **educational project** about making iOS applications *accessible*. Accessible application is such application that works with various *assistive technologies*, such as [VoiceOver](https://www.apple.com/accessibility/voiceover), [Voice Control](https://support.apple.com/en-us/HT210417) and [Switch Control](https://support.apple.com/en-us/HT201370), which enable *people with disabilities* use the application. - -@Image(source: DifferentTechnologies.png, alt: "") +iOS Accessibility Handbook is an open-source **educational project** about making iOS applications *accessible*. Accessible application is such application that works with various *assistive technologies*, such as [**VoiceOver**](https://www.apple.com/accessibility/voiceover), [**Voice Control**](https://support.apple.com/en-us/HT210417) and [**Switch Control**](https://support.apple.com/en-us/HT201370), which enable *people with disabilities* use the application. +@Image(source: accessible-drinkit, alt: "") ### Interactive Learning This handbook provides *extended documentation* for Accessibility Features, including: -- verbose *articles* on the topic, -- interactive *guides* to follow step-by-step -- various media that cover **everything one could ever need to know about accessibility on iOS**. +- verbose *articles* on the topic; +- interactive *guides* to follow step-by-step; +- various media. + +In other words, materials here cover **everything one could ever need to know about accessibility on iOS**. ### Target Audience The project is dedicated to help *developers*, *designers*, *researchers* and so on — in other words, to *everyone working with accessibility* on iOS. There is **no commercial underlayment** and the only reason the project exists is to popularise the topic and to *share* relevant real-life experience of contributing *accessibility experts*. @@ -39,17 +40,17 @@ The handbook is somewhat of a *complete course* of **how to make iOS application To know more about the book's structure scroll down to the bottom of the page where table of contents is. ### Technical Implementation -At the moment the project's form is defined by being a *documentation catalog* ([DocC](https://www.swift.org/documentation/docc)) hosted by [GitHub pages](https://pages.github.com). +At the moment the project's form is defined by being a *documentation catalog* ([**DocC**](https://www.swift.org/documentation/docc)) hosted by [**GitHub pages**](https://pages.github.com). To contribute to the project visit its [GitHub page](https://github.com/VODGroup/AccessibilityDocumentation) and see the instruction of how one may help. ### Contributors -The resources are provided by **Mikhail Rubanov**, Head of Mobile Development at [Dodo Brands](https://dodobrands.io), accesisibility activist and the author of ["About Accesibility on iOS"]( https://rubanov.dev/a11y-book) book. Examplary and illustrative materials are based on his *working experience*. +The resources are provided by **Mikhail Rubanov**, Head of Mobile Development at [**Dodo Brands**](https://dodobrands.io), accesisibility activist and the author of ["**About Accesibility on iOS**"]( https://rubanov.dev/a11y-book) book. Examplary and illustrative materials are based on his *working experience*. @Image(source: "aboutAccessibility-sample", alt: "-") ### VoiceOver Designer -Reading the book you may sometimes notice screenshots of iOS applications with *mark-ups* related to accessibility design over them. This is [VoiceOver Designer](https://rubanov.dev/voice-over-designer), an [open-source](https://github.com/VODGroup/VoiceOverDesigner) macOS application that allows to design *accessibility scenarios* over a screenshot of an app. -![Screenshot of VoiceOver Designer](VoiceOverDesigner.png) +Reading the book you may sometimes notice screenshots of iOS applications with *mark-ups* related to accessibility design over them. This is [**VoiceOver Designer**](https://rubanov.dev/voice-over-designer), an [open-source](https://github.com/VODGroup/VoiceOverDesigner) macOS application that allows to design *accessibility scenarios* over a screenshot of an app. +@Image(source: "vod-sample", alt: "-") diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOverDesigner.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOverDesigner.png deleted file mode 100644 index 45a2167..0000000 Binary files a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOverDesigner.png and /dev/null differ diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOverDesigner~dark.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOverDesigner~dark.png deleted file mode 100644 index 10fd642..0000000 Binary files a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Covers/VoiceOverDesigner~dark.png and /dev/null differ diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Screenshots/aboutAccessibility-sample~dark.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/aboutAccessibility-sample~dark.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Screenshots/aboutAccessibility-sample~dark.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/aboutAccessibility-sample~dark.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Screenshots/aboutAccessibility-sample~light.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/aboutAccessibility-sample~light.png similarity index 100% rename from Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Screenshots/aboutAccessibility-sample~light.png rename to Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/aboutAccessibility-sample~light.png diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/vod-sample~dark.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/vod-sample~dark.png new file mode 100644 index 0000000..d3ed9a8 Binary files /dev/null and b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/vod-sample~dark.png differ diff --git a/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/vod-sample~light.png b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/vod-sample~light.png new file mode 100644 index 0000000..19c158c Binary files /dev/null and b/Sources/iOSAccessibilityHandbook/iOSAccessibilityHandbook.docc/Resources/Samples/vod-sample~light.png differ