Slide 1

Slide 1 text

Accessibility for mobile app s Paula Rosa

Slide 2

Slide 2 text

WHAT IS ACCESSIBILITY?

Slide 3

Slide 3 text

MOBILE ACCESSIBILITY Accessibility is the ability to provide to all users the equivalent experience, considering each user’s disabilities

Slide 4

Slide 4 text

MOBILE ACCESSIBILITY • From home to subway station (with or without help ) • Ask someone’s help from the subway station • From the subway station to the bank (with or without help ) • Wait in the lin e • Ask the attendant to transfer the mone y • From bank to the subway station (with or without help ) • Ask someone’s help in the statio n • From the subway to home (with or without help ) • From the subway to home (with or without help) • Open the ap p • Login the app (if needed ) • Go to transfe r • Fill the correct informatio n • Make the transfe r • Share receipt (if needed) Transfer money - App without accessibility Transfer money - App with accessibility

Slide 5

Slide 5 text

MOBILE ACCESSIBILITY But more important, as developer you can bring to the accessibility users: • Freedo m • Independency • Increase capabilities

Slide 6

Slide 6 text

ACCESSIBILITY FEATURES * All features are located in the user’s settings Color correction Talkback Switch access Brailleback Magnification Voice access

Slide 7

Slide 7 text

TALKBACK

Slide 8

Slide 8 text

TALKBACK • It’s the feature that requires more attention from the developer s • It navigate for each element emitting an audio: “state + text + component type ” • “Connect” + “Button ” • “On” + “shortcut Settings” + switch

Slide 9

Slide 9 text

HOW THE TALKBACK WORKS • Each component is announced by the talkback (when it’s touched or focused ) • The user map the screen (memorising the component’s layout ) • After mapping it, he/she decides what action is going to take 2 actions : - Notice the wal l - Take another direction

Slide 10

Slide 10 text

TALKBACK GESTURES Read the component 2x Click Swipe Focus change Back button Context menu Home screen Recent Apps Noti fi cations

Slide 11

Slide 11 text

TALKBACK GESTURES Context Menu + Global Menu Customisable

Slide 12

Slide 12 text

ACCESSIBILITY NEW FEATURES (ANDROID 12) Media player (Play / Pause ) controls gestures New Magnifier

Slide 13

Slide 13 text

X LABELING COMPONENTS

Slide 14

Slide 14 text

LABELLING DECORATIVE IMAGES android:importantForAcessibility="no" (API >= 16)

Slide 15

Slide 15 text

LABELLING IMAGES THAT EXECUTE ACTIONS

Slide 16

Slide 16 text

X GROUPING VIEWS

Slide 17

Slide 17 text

GROUPING VIEWS

Slide 18

Slide 18 text

X TEXT FIELDS

Slide 19

Slide 19 text

ACCESSIBILITY FOR EDIT TEXTS

Slide 20

Slide 20 text

X LIVE REGION

Slide 21

Slide 21 text

ACCESSIBILITY IN EXECUTION TIME • Polite: Waits to talkback fi nish the audio that is executin g • Assertive: Interrupt the playing audi o • None: none of the other one s ViewCompat.setAccessibilityLiveRegion(view, ViewCompat.ACCESSIBILITY_LIVE_REGION_POLITE);

Slide 22

Slide 22 text

X MULTI-STATE COMPONENTS

Slide 23

Slide 23 text

ACCESSIBILITY FOR MULTI-STATE COMPONENTS view.sendAccessibilityEvent( AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED); Force focus event view.announceForAccessibility(“some announced text”); Announce accessibility text

Slide 24

Slide 24 text

X CUSTOM VIEWS

Slide 25

Slide 25 text

ACCESSIBILITY FOR CUSTOM VIEWS Views inherit from views with accessibility CustomView Views that do not inherit accessibility views - onDraw() - onMeasure() When the methods are overridden Inherit from the View class

Slide 26

Slide 26 text

ACCESSIBILITY FOR CUSTOM VIEWS @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { event.getText().add(“some text”); return true; } Implement the methods: • onPopulateAccessibilityEvent( ) • dispatchPopulateAccessibilityEvent() - child view s • onInitializeAccessibilityEvent( ) • onInitializeAccessibilityNodeInfo (Service ) Events : • TYPE_VIEW_CLICKE D • TYPE_VIEW_LONG_CLICKE D • TYPE_VIEW_FOCUSE D • TYPE_VIEW_SCROLLE D • TYPE_VIEW_HOVER_ENTE R • TYPE_VIEW_HOVER_EXIT

Slide 27

Slide 27 text

ACCESSIBILITY FOR CUSTOM VIEWS Virtual Views • Used when you want to provide views details in a single vie w • Use the Accessibility Service and AccessibilityNodeProvider to work with virtual views

Slide 28

Slide 28 text

X TESTING ACCESSIBILITY

Slide 29

Slide 29 text

ACCESSIBILITY SCANNER What can recognise : • Images description s • Duplicated description s • Text constras t • Cannot recognise everythin g • Android 6.0 +

Slide 30

Slide 30 text

TESTING ACCESSIBILITY BY WRITING TESTS onView(withId(R.id.ic_app_notificacao)).check (matches(not(hasContentDescription()))); Test if the component has (or not) the content description onView(withId(R.id.botao_twitter)).check (matches(withContentDescription(“Login with twitter account”))); Check the component description

Slide 31

Slide 31 text

TESTING ACCESSIBILITY USING LINT

Slide 32

Slide 32 text

X ACCESSIBILITY TIPS

Slide 33

Slide 33 text

ACCESSIBILITY TIPS • Be careful with banners (because they can steal the focus ) • Be careful with components transparency • Explore vibration (that is under explored in mobile apps) • Pay more attention to the multi-state component s • It’s a good practice to integrate voice commands to the app s

Slide 34

Slide 34 text

ACCESSIBILITY FOR TUTORIALS It’s better to use solid screens tutorials instead of the transparency ones . Because the transparency allows the accessibility to focus in the components bellow the desired objects. Incorrect Correct

Slide 35

Slide 35 text

ACCESSIBILITY IN UX / DESIGNER SPECS

Slide 36

Slide 36 text

USEFUL LINKS • https://developer.android.com/guide/topics/ui/accessibility/index.htm l • https://codelabs.developers.google.com/codelabs/basic-android-accessibility / • http://www.slideshare.net/KellyShuster/android-accessibility-droidcon-londo n • http://www.slideshare.net/7mary4/android-accessibility-3999545 6 • https://www.youtube.com/watch?v=euEsfNR5Zw4 (io 2015 ) • https://www.youtube.com/watch?v=Ce7q_cu8mvo (io 2021 ) • https://www.youtube.com/watch?v=apEz73_H2fU (Voice Access)

Slide 37

Slide 37 text

THANK YOU