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

Accessibility: When You See It...

Bas Broek
November 02, 2017

Accessibility: When You See It...

Bas Broek

November 02, 2017
Tweet

More Decks by Bas Broek

Other Decks in Programming

Transcript

  1. The design of products, devices, services, or environments for people

    who experience disabilities. — "Wikipedia" 2 — @basthomas
  2. [..] an extraordinary opportunity to deliver a superior mobile experience

    to every customer, including those with special needs. — Apple 3 — @basthomas
  3. 1. WHY? > Vision > Hearing > Physical & Motor

    Skills > Literacy & Learning 6 — @basthomas
  4. 2. WHAT? > Inverted Images (new) > Accessibility Labels &

    Hints > Accessibility Traits > "Magic Tap" & The "Z" gesture > Reduced Motion & Transparency > Dynamic Type > Haptic Feedback 17 — @basthomas
  5. 3. HOW? IT'S SUPER EASY TO START SUPPORTING ACCESSIBILITY. >

    Audit your app with VoiceOver > Make it fun (compute accessibility labels, make use of subclassing etc.) 19 — @basthomas
  6. 3. HOW? ADD A DESELECTED AND SELECTED STATE FOR ALL

    YOUR TAB ICONS. 20 — @basthomas
  7. 3. HOW? MAKE CELLS ACCESSIBLE, NOT CELL ELEMENTS // if

    it's a button cell.accessibilityTraits |= UIAccessibilityTraitButton cell.isAccessibilityElement = true cell.accessibilityLabel = cell.contentView.subviews .flatMap { $0.accessibilityLabel } .reduce("") { "\($0).\n\($1)" } 21 — @basthomas
  8. 3. HOW? MAKE IT FUN func accessibilityPerformMagicTap() -> Bool func

    accessibilityPerformEscape() -> Bool // iOS 11 == Free Dark Mode view.accessibilityIgnoresInvertColors = true 22 — @basthomas
  9. 3. HOW? extension Date { private static let visualTimestampFormatter: DateComponentsFormatter

    = { let formatter = DateComponentsFormatter() formatter.allowedUnits = [.day, .hour, .minute, .second] formatter.unitsStyle = .abbreviated formatter.maximumUnitCount = 1 return formatter }() private static let audioTimestampFormatter: DateComponentsFormatter = { let formatter = DateComponentsFormatter() formatter.allowedUnits = [.day, .hour, .minute, .second] formatter.unitsStyle = .full formatter.maximumUnitCount = 1 return formatter }() } 23 — @basthomas
  10. 3. HOW? extension Date { var visualTimestamp: String { let

    now = Date() return Date.visualTimestampFormatter.string(from: self, to: now)! } var audioTimestamp: String { let now = Date() return Date.audioTimestampFormatter.string(from: self, to: now)! } } let past = Date(timeIntervalSinceNow: -100_000) past.visualTimestamp // 1d past.audioTimestamp // 1 day 24 — @basthomas
  11. CONCLUSION > Accessibility is something you need to understand and

    use to be able to implement it > Adding accessibility support is doable in steps, is easy and (you can make it) fun 25 — @basthomas
  12. REFERENCES > Accessibility in GitHawk (blogpost) > "Improve Accessibility" in

    GitHawk (issue) > apple.com/accessibility > Accessibility for Developers > What's New in Accessibility (video) > Building Apps with Dynamic Type (video) 27 — @basthomas