Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[MOPCON 2015] 談談行動裝置的 Accessibility

[MOPCON 2015] 談談行動裝置的 Accessibility

「什麼?這個字『唸』不出來?這到底是什麼功能?」這可能是很多盲人朋友在使用手機時心中的 OS。本議程將藉由簡單的例子 (Android / iOS) 來探討如何使用程式來解決。並從自身實際使用及教學的經驗,透過範例來了解什麼是友善的 APP,讓您的 APP 在絢麗外,也邁向無障礙 (Accessibility)。

Johnny Sung

November 03, 2015
Tweet

More Decks by Johnny Sung

Other Decks in Programming

Transcript

  1. -(void)voiceOverStatusChanged:(NSNotification *)n { if (UIAccessibilityIsVoiceOverRunning()) { // Voice over is

    running } else { // Voice over is not running } } ஑ỗ7PJDF0WFS⊯Ⅲ ⊁Ṧ7PJDF0WFS⬏Ⴈ⊯Ⅲ
  2. ק∕⊨⁛ọቔ UIAccessibilityCustomAction *a1 = [[UIAccessibilityCustomAction alloc] initWithName:@"Action 1" target:self selector:@selector(action01:)];

    UIAccessibilityCustomAction *a2 = [[UIAccessibilityCustomAction alloc] initWithName:@"Action 2" target:self selector:@selector(action02:)]; self.myButton.accessibilityCustomActions = @[a1, a2];
  3. ק∕⊨⁛ọቔ - (BOOL) action01:(UIAccessibilityCustomAction *)action { // Do something return

    YES; } - (BOOL) action02:(UIAccessibilityCustomAction *)action { // Do something return YES; }
  4. <RelativeLayout android:clickable="true"
 android:layout_width="match_parent"
 android:layout_height="wrap_content">
 
 <ImageView
 android:id="@+id/icon"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:src="@drawable/computer"/>


    
 <TextView
 android:id="@+id/ip"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:layout_toRightOf="@+id/icon"
 android:text="192.168.4.107"/>
 
 <TextView
 android:id="@+id/port"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:layout_toRightOf="@+id/icon"
 android:layout_below="@+id/ip"
 android:text="11000"/>
 </RelativeLayout> ಕ⊾ࢊề
  5. android:importantForAccessibility="auto" • auto - 羬翄ᛔᤈڣ䥁 (毆戔) • yes - ᥝ虏

    Talkback ڣ捝 • no - ஺ኼᆿᗭ奲ᆌ讨牧֕䨝薹ຉৼزկ • noHideDescendants - 獊犋虏 Talkback ڣ捝 ޭ੻ಕ⊾ࢊề ಕ⊾ࢊề
  6. 3FGFSFODFT • https://developer.apple.com/library/ios/documentation/UIKit/Reference/ UIAccessibility_Protocol/ • http://www.deque.com/blog/dynamic-notifications/ • https://eyes-free.googlecode.com/svn/trunk/documentation/ android_access/index.html •

    https://www.udemy.com/accessibility-features-on-android/ • http://blog.supertop.co/post/117642258462/custom-accessibility-options- in-unread • http://www.programcreek.com/java-api-examples/index.php? api=android.view.accessibility.AccessibilityManager