-
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
c16ea13
commit c0db70f
Showing
12 changed files
with
201 additions
and
26 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...ocumentation/Documentation.docc/Articles/AssistiveTechnologies/SwitchControl.md
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 @@ | ||
# SwitchControl | ||
|
||
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. | ||
|
||
## Overview | ||
|
||
![Switch control modes: focus groups on elements, cross selection and submenu](SwitchControlOverview) | ||
|
||
## How to setup | ||
|
||
## Command types | ||
|
||
## Single command | ||
|
||
## Importance of grouping | ||
|
||
## Face recognition | ||
|
||
## Sound Recognition |
12 changes: 12 additions & 0 deletions
12
...Documentation/Documentation.docc/Articles/AssistiveTechnologies/VoiceControl.md
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,12 @@ | ||
# VoiceControl | ||
|
||
Adds additional commands over graphical UI to control a phone by voice commands. A user of VoiceControl can see, but can't touch their phone, as a result he can pronounce commands lite "select Pepperoni", "tap purchase" or "close screen". iPhone recognizes speach, convert it to text and links command to elements' description. | ||
|
||
|
||
|
||
## Overview | ||
|
||
![Voice Control modes: with labels, enumerated elements or grid](VoiceControlOverview) | ||
|
||
[Video how to use Voice Control](https://www.youtube.com/watch?v=eg22JaZWAgs) | ||
|
10 changes: 10 additions & 0 deletions
10
...ityDocumentation/Documentation.docc/Articles/AssistiveTechnologies/VoiceOver.md
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,10 @@ | ||
# VoiceOver | ||
|
||
Helps blind or low-visioned persons to use a phone by listening audio description of UI and command by different swipes and non-direct touches. Developer prepare text description of the element, iPhone will generate voice description from text. | ||
|
||
## Overview | ||
|
||
![VoiceOver gestures](VoiceOverGestures) | ||
|
||
[Video how to navigate by VoiceOver](https://www.youtube.com/watch?v=qDm7GiKra28) | ||
|
14 changes: 0 additions & 14 deletions
14
Sources/AccessibilityDocumentation/Documentation.docc/Articles/ControlHierarchy.md
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...essibilityDocumentation/Documentation.docc/Articles/Process/ControlHierarchy.md
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,49 @@ | ||
# ControlHierarchy | ||
|
||
## Overview | ||
|
||
Assistive technologies take description of elements to provide different way of communications. The core part of this process is providing information about hierarchy of elements, what element should be focusable and what should be hidden from focus. | ||
|
||
### View hierarchy vs Accessibility Tree | ||
|
||
Regular screen we can describe like tree of Views with parent-child relation. Example: | ||
|
||
Screen with pizza: | ||
``` | ||
- Image | ||
- Title | ||
- Description container | ||
- Size label | ||
- Size segmented control wrapper | ||
- Small size button | ||
- Medium size button | ||
- Large size button | ||
- Purchase button | ||
- Text inside button | ||
``` | ||
|
||
VoiceOver needs another representation: | ||
``` | ||
- Title | ||
- Size label | ||
- Size segmented control as adjustable element | ||
- Purchase button with text from the inside label | ||
``` | ||
|
||
Voice Control and Switch Control place focus on buttons and tree should be different: | ||
``` | ||
- Small size button | ||
- Medium size button | ||
- Large size button | ||
- Purchase button | ||
``` | ||
|
||
As a result you can control what elements from your layout will be exposed to different technologies for better user experience. | ||
|
||
## Topics | ||
|
||
- ``Book/isAccessibilityElement`` | ||
- ``Book/accessibilityElementsHidden`` | ||
- ``Book/accessibilityViewIsModal`` | ||
- ``Book/shouldGroupAccessibilityChildren`` | ||
- ``AccessibilityContainer`` |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
94 changes: 94 additions & 0 deletions
94
Sources/AccessibilityDocumentation/UIAccessibility+Container.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,94 @@ | ||
import UIKit | ||
|
||
// | ||
// UIAccessibilityContainer.h | ||
// UIKit | ||
// | ||
// Copyright (c) 2016-2018 Apple Inc. All rights reserved. | ||
// | ||
|
||
/** | ||
UIAccessibilityContainer methods can be overridden to vend individual elements | ||
that are managed by a single UIView. | ||
|
||
For example, a single UIView might draw several items that (to an | ||
end user) have separate meaning and functionality. It is important to vend | ||
each item as an individual accessibility element. | ||
|
||
Sub-elements of a container that are not represented by concrete UIView | ||
instances (perhaps painted text or icons) can be represented using instances | ||
of UIAccessibilityElement class (see UIAccessibilityElement.h). | ||
|
||
Accessibility containers MUST return NO to -isAccessibilityElement. | ||
*/ | ||
public class AccessibilityContainer { | ||
|
||
|
||
@MainActor open func accessibilityElementCount() -> Int { 0 } | ||
|
||
|
||
@MainActor open func accessibilityElement(at index: Int) -> Any? { nil } | ||
|
||
|
||
@MainActor open func index(ofAccessibilityElement element: Any) -> Int { 0 } | ||
|
||
|
||
/// A list of container elements managed by the receiver. | ||
/// This can be used as an alternative to implementing the dynamic methods. | ||
/// default == nil | ||
@available(iOS 8.0, *) | ||
@MainActor open var accessibilityElements: [Any]? = nil | ||
|
||
|
||
/// Some containers provide more context for accessibility elements, such as tables or lists. | ||
/// Set this property so that assistive technologies can output more information. | ||
/// default == UIAccessibilityContainerTypeNone | ||
@available(iOS 11.0, *) | ||
@MainActor open var accessibilityContainerType: UIAccessibilityContainerType = .none | ||
|
||
|
||
/// An array of container elements similar to accessibilityElements but specific for automation. | ||
/// This can be used to modify the children in the accessibility tree for automation. | ||
/// If not set, automationElements will default first to accessibilityElements if it’s not an accessibility element. | ||
/// If there are no accessibilityElements and the view is an accessibility element, it will return the list of subviews that have accessibilityIdentifier. | ||
/// Otherwise, the default will be an empty array. | ||
@available(iOS 17.0, *) | ||
@MainActor open var automationElements: [Any]? = nil | ||
} | ||
|
||
/** | ||
The UIAccessibilityContainerDataTable and UIAccessibilityContainerDataTableCell protocols | ||
convey more information specific to tables that contain structured data. | ||
*/ | ||
|
||
@available(iOS 11.0, *) | ||
@MainActor public protocol UIAccessibilityContainerDataTableCell : NSObjectProtocol { | ||
|
||
|
||
/// The row/column index + the row/column span. | ||
/// default == { NSNotFound, 0 } | ||
func accessibilityRowRange() -> NSRange | ||
|
||
func accessibilityColumnRange() -> NSRange | ||
} | ||
|
||
@available(iOS 11.0, *) | ||
@MainActor public protocol UIAccessibilityContainerDataTable : NSObjectProtocol { | ||
|
||
|
||
/// Return the cell element for a specific row/column, including elements that span rows/columns. | ||
/// default == nil | ||
func accessibilityDataTableCellElement(forRow row: Int, column: Int) -> UIAccessibilityContainerDataTableCell? | ||
|
||
|
||
func accessibilityRowCount() -> Int | ||
|
||
func accessibilityColumnCount() -> Int | ||
|
||
|
||
/// Return header elements for a specific row or column. | ||
/// default == nil | ||
func accessibilityHeaderElements(forRow row: Int) -> [UIAccessibilityContainerDataTableCell]? | ||
|
||
func accessibilityHeaderElements(forColumn column: Int) -> [UIAccessibilityContainerDataTableCell]? | ||
} |
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