SlideShare uma empresa Scribd logo
1 de 95
RUBY MOTION
             &
ACCESSIBILITY
    by Austin Seraphin
iOS Accessibility Consultant
Austin Seraphin
                      Blind since birth

                      Accessibility consultant

                      Passionate developer



@AustinSeraphin             AustinSeraphin.com
I started on an Apple II/e




The 1st computer that a blind person could use
then I moved to MS-DOS




     and then unfortunately...
I used Windows




 (still don’t know why)
then I moved to Linux




        Yeahhh!
then I got an iPhone




 and that was the tipping point.
Then I got 2 Macs and an iPad!
The iPhone changed my universe
     as soon as it entered it.
I could see a stock chart




   The iPhone changed my universe
        as soon as it entered it.
I could check the weather




    The iPhone changed my universe
         as soon as it entered it.
then I received my first text




                 From my mom.
  It was quite a moment, it really moved her.
The challenge




   2 dimensions
The challenge




   1 dimension
Apps




I want to download the world!
I got a color reader
I got a color reader




  but it kept saying: “black”.
black
black
black
black
I thought
it wasn’t working
Then I realized it was 1 am
Then I realized it was 1 am
 and the lights were off...
so I turned the lights on




and finally I could see all the colors around me.
iPhone makes assistive devices obsolete




              =
iPhone makes assistive devices obsolete


                       vs




    Color ID                Colorino
   (Color identifier)        (Color identifier)




      Free                     $200
iPhone makes assistive devices obsolete


                    vs




    LookTel                      iBill®
   (Money reader)        (Talking banknote identifier)




     $9.99                        $119
iPhone makes assistive devices obsolete


                                   vs




       Tap to see                        i.d. mate Quest®
(Object recognition via picture)        (Object recognition via bar code)




          FREE                                   $1,299
iPhone makes assistive devices obsolete


                                  vs




    BlindSquare                          Trekker Breeze
(GPS & step-by-step directions)        (GPS & step-by-step directions)




        $14.99                                   $699
iPhone makes assistive devices obsolete


                    vs



Talking Scientific         ORION TI-36X
   Calculator            (Talking Scientific Calculator)




     $4.49                         $249
iPhone makes assistive devices obsolete


                        vs



      Flesky                  PAC Mate Omni
   (Eyes-free typing)        (Note taker with Braille display)




      FREE                             $995+
Accessibility programming
Accessibility programming
  Apple has baked accessibility right in.
Accessibility programming
  Apple has baked accessibility right in.
          Thanks Steve Jobs.
•   Standard UIKit controls and views
    are accessible by default




Accessibility programming
•   Standard UIKit controls and views
    are accessible by default

•    The UIAccessibility programming
    interface makes applications accessible




Accessibility programming
Two protocols, a class, and a file of constants


•   The UIAccessibility informal protocol
    Defines attributes to convey proper information to VoiceOver.


•   The UIAccessibility Container Informal protocol
    Allows subclasses of UIView to make some or all elements accessible as separate elements.


•   The accessibilityElement class
    Defines an object not usually accessible to VoiceOver. The container protocol uses these.




    Accessibility programming
UIAccessibility informal protocol Attributes


•   accessibilityLabel
    Defaults to title or image name. Image names usually make bad labels.


•   accessibilityHint

•   accessibilityTraits
    Describe an element's state, behavior, or usage.


•   accessibilityValue




    Accessibility programming
UIAccessibility informal protocol Attributes


•   accessibilityLanguage

•   accessibilityFrame

•   accessibilityActivationPoint
    The point activated when double-tapped. defaults to center.


•   accessibilityViewIsModal
    Ignores elements within views which are siblings of the receiver




    Accessibility programming
UIAccessibility informal protocol Attributes




•   shouldGroupAccessibilityChildren
    Reads in order instead of horizontally

•   accessibilityElementHidden




    Accessibility programming
Make good labels

•   Labels briefly describe the element.

•   They do not include the control type.

•   They begin with a capitalized word
    and does not end with a period.

•   Localized.



    Accessibility programming
Create good hints




•   Hints describe the results of performing an action.

•   Only provide one when not obvious.




    Accessibility programming
Create good hints


•   They briefly describe results.

•   They begin with a verb and omit the subject.

•   They use the third person singular declarative form - Plays
    music instead of play music.




    Accessibility programming
Create good hints

•   Imagine describing it to a friend:
    "Tapping the button plays music."

•   They begin with a capitalized word and ends with a period.

•   They do not include the action or gesture.

•   They do not include the name or type of the controller
    or view.



    Accessibility programming
Traits


Traits describe the behavior of an accessible user interface
element. Or them with the vertical.

For example: for an image that opens a link in Safari, combine
the image and link traits.




 Accessibility programming
Traits

•   UIAccessibilityTraitNone

•   UIAccessibilityTraitButton

•   UIAccessibilityTraitLink

•   UIAccessibilityTraitSearchField

•   UIAccessibilityTraitImage
    This trait can be combined with the button or link traits.




    Accessibility programming
Traits


•   UIAccessibilityTraitSelected
    For example, a selected table row, or a selected segment in a segmented control.


•   UIAccessibilityTraitKeyboardKey

•   UIAccessibilityTraitStaticText

•   UIAccessibilityTraitSummaryElement
    This provides summary information when the application starts.




    Accessibility programming
Traits


•   UIAccessibilityTraitPlaysSound
    The accessibility element plays its own sound when activated.


•   UIAccessibilityTraitStartsMediaSession
    Silences VoiceOver during a media session that should not be interrupted.
    For example, silence VoiceOver speech while the user is recording audio.


•   UIAccessibilityTraitUpdatesFrequently
    Tells VoiceOver to avoid handling continual notifications.
    Instead it should poll for changes when it needs updated information.




    Accessibility programming
Traits

•   UIAccessibilityTraitAdjustable

•   UIAccessibilityTraitAllowsDirectInteraction
    Allows direct touch interaction. For example, a view that represents a piano keyboard.


•   UIAccessibilityTraitCausesPageTurn
    Causes an automatic page turn when VoiceOver finishes reading the text within it.
    Like in iBooks.


•   UIAccessibilityTraitNotEnabled
    Not enabled and does not respond to user interaction.




    Accessibility programming
Set attributes in a custom subclass implementation
class MyCustomView < UIView

  def accessibilityElement?
    true
  end

  def accessibilityLabel
    BubbleWrap.localized_string(:MyCustomView_label,nil)
  end

  def accessibilityHint
    BubbleWrap.localized_string(:MyCustomView_hint,nil)
  end

  # This view behaves like a button.
  def accessibilityTraits
    UIAccessibilityTraitButton
  end

end


Accessibility programming
If you think this code looks simple
If you think this code looks simple
then you've begun to get the point.
Set attributes in the instantiation code


class MyCustomViewController < UIViewController

  def init
    view=MyCustomView.alloc.init
    view.accessibilityElement?=true
    view.accessibilityTraits=UIAccessibilityTraitButton
    view.accessibilityLabel=BubbleWrap.
               localized_string(:MyCustomView_label, nil)
    view.accessibilityHint=BubbleWrap.
               localized_string(:MyCustomView_hint, nil)
  end

end




Accessibility programming
Make Picker Views Accessible



If you need to, you can use


pickerView:accessibilityLabelForComponent:

and


pickerView:accessibilityHintForComponent:




 Accessibility programming
Make custom container views accessible



•   If you use UITableView then you don't have to worry.

•   You need to make the contained elements accessible,
    but the container not accessible.

•   Users interact with the elements, not the container.




    Accessibility programming
The container protocol
makes the contained elements available as an array.

   class MultiFacetedView < UIView

     def accessibilityElements
       if @accessibility_element.nil?
         @accessible_elements=Array.new
         element1=UIAccessibilityElement.
                alloc.initWithAccessibilityContainer(self)
         # set attributes
         @accessibility_elements<<element1
         # Perform similar steps for other elements
       end
       @accessible_elements
     end

     def accessibilityElement?
       false
     end
     ...


  Accessibility programming
The container protocol
makes the contained elements available as an array.
  ...

  def accessibilityElementCount
      accessibilityElements.length
    end

    def accessibilityElementAtIndex(index)
      accessibilityElements[index]
    end

    def indexOfAccessibilityElement(element)
      accessibilityElements.find_index(element)
    end

  end




 Accessibility programming
Enhance the accessibility of table views



class CurrentWeather < UIView

  def accessibilityLabel
    weatherCityString=weatherCity.accessibilityLabel
    weatherTempString=WeatherTemp.accessibilityLabel
      "#{weatherCityString}, #{weatherTempString}"
  end

end


Example: "Philadelphia, 45 degrees"




 Accessibility programming
Make non-textual data accessible
A custom view that draws the number of stars for an item's rating.
class RatingView <UIView

   attr_accessor starCount

   # ... other implementation code here ...

   def accessibilityLabel
     if(@starCount==1)
       ratingString=BubbleWrap.localized_string(:rating_singular_label, "star"
     else
       ratingString=BubbleWrap.localized_string(:rating_plural_label, "stars")
     end
     "#{@starCount} #{ratingString}"
   end

   # ... other implementation code here ...

end

Example: 1 star. 2 stars. 3 stars.


  Accessibility programming
Notifications


•   You can observe and post notifications.

•   Observable notifications come from UIKit or from other
    accessibility changes.

•   You observe using the standard notification center.

•   You post using UIAccessibilityPostNotification.



    Accessibility programming
Notifications


UIAccessibilityLayoutChangedNotification


•   When the layout of the screen changes, such as when an
    element appears or disappears.

•   Includes one parameter, either a string which VoiceOver
    speaks, or an accessibilityElement VoiceOver moves to.




    Accessibility programming
Notifications


UIAccessibilityScreenChangedNotification


•   When a new view appears which comprises a major
    portion of the screen.

•   Same parameter as layout changed notification.




    Accessibility programming
Notifications


•   UIAccessibilityPageScrolledNotification

•   UIAccessibilityAnnouncementNotification
    Posted to make VoiceOver say something.


•   UIAccessibilityAnnouncementDidFinishNotification
    Causes an automatic page turn when VoiceOver finishes reading the text within it.
    Like in iBooks.


•   UIAccessibilityTraitNotEnabled
    Not enabled and does not respond to user interaction.




    Accessibility programming
Make dynamic elements accessible




•   Make sure methods return up to date information.

•   Send a UIAccessibilityScreenChangedNotification.




    Accessibility programming
Make dynamic elements accessible

class BigKey < UIView

  # A custom keyboard key
  def accessibilityLabel
    keyLabel=KeyLabel.accessibilityLabel
    if(self.letterKey?)
      if(self.shifted?)
        keyLabel.upcase
      else
        keyLabel.downcase
      end
    end else
      keyLabel
    end
  end

 ...


 Accessibility programming
Make dynamic elements accessible
...
 def accessibilityTraits
    traits=super.accessibilityTraits|
UIAccessibilityTraitKeyboardKey
    if(self.shiftKey?&&self.selected?)
      traits|=UIAccessibilityTraitSelected
    end
    traits
  end

  def keyboardChangedToNumbers
    # perform number change here

UIAccessibilityPostNotification(UIAccessibilityLayoutChange
dNotification, nil)
  end

end


 Accessibility programming
Make dynamic elements accessible

•   UIAccessibilityAction Informal Protocol.
    A way to implement specific actions on accessibility objects


•   accessibilityPerformEscape
    Dismisses a modal view and returns the success or failure of the action


•   accessibilityPerformMagicTap

•   accessibilityScroll
    Scrolls content and returns success or failure.
    Takes UIAccessibilityScrollDirection as a parameter.




    Accessibility programming
Make dynamic elements accessible




•   accessibilityDecrement

•   accessibilityIncrement
    Works with the UIAccessibilityTraitAdjustable 




    Accessibility programming
App developing for the blind




   I get more done in Ruby
App developing for the blind




     I get more done in Ruby
I think Ruby sounds better with speech.
App developing for the blind




   XCode works horribly
App developing for the blind




I need
a beer
App developing for the blind




I need               just to open
a beer                  XCode
App developing for the blind
         Give me:
App developing for the blind
                Give me:




iMac
App developing for the blind
                Give me:


         +




iMac            Ruby
App developing for the blind
                Give me:


         +                 +   +




iMac            Ruby               Terminal
App developing for the blind
       Give me:

iMac            No simulator



Ruby


Terminal
App developing for the blind
       Give me:

iMac            No simulator
                The iOS simulator
                doesn't work well with VoiceOver


Ruby


Terminal
App developing for the blind
       Give me:

iMac            No simulator
                The iOS simulator
                doesn't work well with VoiceOver


Ruby            Always better to test it on the device




Terminal
App developing for the blind
       Give me:

iMac            No simulator
                The iOS simulator
                doesn't work well with VoiceOver


Ruby            Always better to test it on the device


                The Accessibility Inspector doesn't
                tell everything.
Terminal
App developing for the blind

RubyMotion Debugger
          •   Based on GDB, it can connect to and
              introspect RubyMotion processes.

          •   It works effectively, still the experience could
              use improving.

          •   The developers plan to build a higher level
              and friendlier debugger.
App developing for the blind


Interface Builder has no accessibility.
             •   I had to learn how to build views
                 programmatically.

             •   I think of the screen either as objects relative
                 to each other, or as objects positioned
                 absolutely on a screen.
App developing for the blind


Geomotion
      •   It helped me finally understand iOS geometry
          and gave me that ah ha moment!

      •   CGRect.make helps  understand the code.

      •   Methods such as below and beside help lay
          out elements relative to each other.
App developing for the blind


Teacup
         •   Percents help lay out screens based on
             absolute location.

         •   A non-verbose syntax sounds better.

         •   The less pixel math the better.
App developing for the blind


Functional tests improve Accessibility

        •   Functional tests use the accessibility label.

        •   This forces properly labeled buttons,
            the biggest complaint.
App developing for the blind




             Conclusion
App developing for the blind

    Conclusion
•   RubyMotion increases productivity for the sighted and
    especially the blind, and it will only get better.
App developing for the blind

    Conclusion
•   RubyMotion increases productivity for the sighted and
    especially the blind, and it will only get better.

•   The iPhone allows the blind to do wonderful things.
App developing for the blind

    Conclusion
•   RubyMotion increases productivity for the sighted and
    especially the blind, and it will only get better.

•   The iPhone allows the blind to do wonderful things.

•   In most cases you can make your app accessible with
    little effort.
App developing for the blind

    Conclusion
•   RubyMotion increases productivity for the sighted and
    especially the blind, and it will only get better.

•   The iPhone allows the blind to do wonderful things.

•   In most cases you can make your app accessible with
    little effort.

•   It's the right thing to do.
App developing for the blind




If Apple wouldn't have made the iPhone accessible
App developing for the blind




I wouldn't stand here now giving this talk.
Rubymotion & Accessibility

                               Austin Seraphin
                               Accessibility consultant

                               @AustinSeraphin



                               AustinSeraphin.com
Special thanks to
               For the visuals                   For being such an
               italian-label.com                 amazing
                                                 community
                                                 IndyHall.org
 advertising

Mais conteúdo relacionado

Semelhante a How to: Accessible iPhone/iPad apps that the blind can use with Rubymotion

T3con10_html5_kosack_zinner
T3con10_html5_kosack_zinnerT3con10_html5_kosack_zinner
T3con10_html5_kosack_zinnerRobert Zinner
 
iOS and Android accessibility APIs (AccessU 2017)
iOS and Android accessibility APIs (AccessU 2017)iOS and Android accessibility APIs (AccessU 2017)
iOS and Android accessibility APIs (AccessU 2017)Jon Gibbins
 
iOS 7.1 accessibility for developers
iOS 7.1 accessibility for developersiOS 7.1 accessibility for developers
iOS 7.1 accessibility for developersTed Drake
 
Session 210 _accessibility_for_ios
Session 210 _accessibility_for_iosSession 210 _accessibility_for_ios
Session 210 _accessibility_for_ioscheinyeanlim
 
App design guide
App design guideApp design guide
App design guideJintin Lin
 
Accessibility in android And Add accessibility hooks to a custom view
Accessibility in android And Add accessibility hooks to a custom viewAccessibility in android And Add accessibility hooks to a custom view
Accessibility in android And Add accessibility hooks to a custom viewAly Arman
 
Guide Dogs and Digital Devices
Guide Dogs and Digital DevicesGuide Dogs and Digital Devices
Guide Dogs and Digital DevicesXamarin
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhoneErin Dees
 
Making Great iOS Experiences
Making Great iOS ExperiencesMaking Great iOS Experiences
Making Great iOS ExperiencesWeave The People
 
How to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchHow to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchSoftTeco
 
Making Apps More Accessible - Rizwan Ahmed - Swift
Making Apps More Accessible - Rizwan Ahmed - SwiftMaking Apps More Accessible - Rizwan Ahmed - Swift
Making Apps More Accessible - Rizwan Ahmed - SwiftRizwan Ahmed
 
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018Patrick Lauke
 
iPads accessibility_vision
iPads accessibility_visioniPads accessibility_vision
iPads accessibility_visionlnash
 
Yikes...It Looks Like That?! - UI Worst Practices
Yikes...It Looks Like That?! - UI Worst PracticesYikes...It Looks Like That?! - UI Worst Practices
Yikes...It Looks Like That?! - UI Worst PracticesBruce Elgort
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationVu Tran Lam
 
iOS Human Interface Design Guideline Part 1
iOS Human Interface Design Guideline Part 1iOS Human Interface Design Guideline Part 1
iOS Human Interface Design Guideline Part 1Sansern Wuthirat
 
Comp4010 lecture6 Prototyping
Comp4010 lecture6 PrototypingComp4010 lecture6 Prototyping
Comp4010 lecture6 PrototypingMark Billinghurst
 
iOS Accessibility
iOS AccessibilityiOS Accessibility
iOS AccessibilityLuis Abreu
 

Semelhante a How to: Accessible iPhone/iPad apps that the blind can use with Rubymotion (20)

T3con10_html5_kosack_zinner
T3con10_html5_kosack_zinnerT3con10_html5_kosack_zinner
T3con10_html5_kosack_zinner
 
iOS and Android accessibility APIs (AccessU 2017)
iOS and Android accessibility APIs (AccessU 2017)iOS and Android accessibility APIs (AccessU 2017)
iOS and Android accessibility APIs (AccessU 2017)
 
iOS 7.1 accessibility for developers
iOS 7.1 accessibility for developersiOS 7.1 accessibility for developers
iOS 7.1 accessibility for developers
 
Mocast Postmortem
Mocast PostmortemMocast Postmortem
Mocast Postmortem
 
Session 210 _accessibility_for_ios
Session 210 _accessibility_for_iosSession 210 _accessibility_for_ios
Session 210 _accessibility_for_ios
 
App design guide
App design guideApp design guide
App design guide
 
Accessibility in android And Add accessibility hooks to a custom view
Accessibility in android And Add accessibility hooks to a custom viewAccessibility in android And Add accessibility hooks to a custom view
Accessibility in android And Add accessibility hooks to a custom view
 
Guide Dogs and Digital Devices
Guide Dogs and Digital DevicesGuide Dogs and Digital Devices
Guide Dogs and Digital Devices
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
Making Great iOS Experiences
Making Great iOS ExperiencesMaking Great iOS Experiences
Making Great iOS Experiences
 
How to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchHow to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple Watch
 
Making Apps More Accessible - Rizwan Ahmed - Swift
Making Apps More Accessible - Rizwan Ahmed - SwiftMaking Apps More Accessible - Rizwan Ahmed - Swift
Making Apps More Accessible - Rizwan Ahmed - Swift
 
Organic Design UI (2010)
Organic Design UI (2010)Organic Design UI (2010)
Organic Design UI (2010)
 
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
 
iPads accessibility_vision
iPads accessibility_visioniPads accessibility_vision
iPads accessibility_vision
 
Yikes...It Looks Like That?! - UI Worst Practices
Yikes...It Looks Like That?! - UI Worst PracticesYikes...It Looks Like That?! - UI Worst Practices
Yikes...It Looks Like That?! - UI Worst Practices
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
iOS Human Interface Design Guideline Part 1
iOS Human Interface Design Guideline Part 1iOS Human Interface Design Guideline Part 1
iOS Human Interface Design Guideline Part 1
 
Comp4010 lecture6 Prototyping
Comp4010 lecture6 PrototypingComp4010 lecture6 Prototyping
Comp4010 lecture6 Prototyping
 
iOS Accessibility
iOS AccessibilityiOS Accessibility
iOS Accessibility
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

How to: Accessible iPhone/iPad apps that the blind can use with Rubymotion

  • 1. RUBY MOTION & ACCESSIBILITY by Austin Seraphin iOS Accessibility Consultant
  • 2. Austin Seraphin Blind since birth Accessibility consultant Passionate developer @AustinSeraphin AustinSeraphin.com
  • 3. I started on an Apple II/e The 1st computer that a blind person could use
  • 4. then I moved to MS-DOS and then unfortunately...
  • 5. I used Windows (still don’t know why)
  • 6. then I moved to Linux Yeahhh!
  • 7. then I got an iPhone and that was the tipping point.
  • 8. Then I got 2 Macs and an iPad!
  • 9. The iPhone changed my universe as soon as it entered it.
  • 10. I could see a stock chart The iPhone changed my universe as soon as it entered it.
  • 11. I could check the weather The iPhone changed my universe as soon as it entered it.
  • 12. then I received my first text From my mom. It was quite a moment, it really moved her.
  • 13. The challenge 2 dimensions
  • 14. The challenge 1 dimension
  • 15. Apps I want to download the world!
  • 16. I got a color reader
  • 17. I got a color reader but it kept saying: “black”.
  • 18. black
  • 19. black
  • 20. black
  • 21. black
  • 23. Then I realized it was 1 am
  • 24. Then I realized it was 1 am and the lights were off...
  • 25. so I turned the lights on and finally I could see all the colors around me.
  • 26. iPhone makes assistive devices obsolete =
  • 27. iPhone makes assistive devices obsolete vs Color ID Colorino (Color identifier) (Color identifier) Free $200
  • 28. iPhone makes assistive devices obsolete vs LookTel iBill® (Money reader) (Talking banknote identifier) $9.99 $119
  • 29. iPhone makes assistive devices obsolete vs Tap to see i.d. mate Quest® (Object recognition via picture) (Object recognition via bar code) FREE $1,299
  • 30. iPhone makes assistive devices obsolete vs BlindSquare Trekker Breeze (GPS & step-by-step directions) (GPS & step-by-step directions) $14.99 $699
  • 31. iPhone makes assistive devices obsolete vs Talking Scientific ORION TI-36X Calculator (Talking Scientific Calculator) $4.49 $249
  • 32. iPhone makes assistive devices obsolete vs Flesky PAC Mate Omni (Eyes-free typing) (Note taker with Braille display) FREE $995+
  • 34. Accessibility programming Apple has baked accessibility right in.
  • 35. Accessibility programming Apple has baked accessibility right in. Thanks Steve Jobs.
  • 36. Standard UIKit controls and views are accessible by default Accessibility programming
  • 37. Standard UIKit controls and views are accessible by default • The UIAccessibility programming interface makes applications accessible Accessibility programming
  • 38. Two protocols, a class, and a file of constants • The UIAccessibility informal protocol Defines attributes to convey proper information to VoiceOver. • The UIAccessibility Container Informal protocol Allows subclasses of UIView to make some or all elements accessible as separate elements. • The accessibilityElement class Defines an object not usually accessible to VoiceOver. The container protocol uses these. Accessibility programming
  • 39. UIAccessibility informal protocol Attributes • accessibilityLabel Defaults to title or image name. Image names usually make bad labels. • accessibilityHint • accessibilityTraits Describe an element's state, behavior, or usage. • accessibilityValue Accessibility programming
  • 40. UIAccessibility informal protocol Attributes • accessibilityLanguage • accessibilityFrame • accessibilityActivationPoint The point activated when double-tapped. defaults to center. • accessibilityViewIsModal Ignores elements within views which are siblings of the receiver Accessibility programming
  • 41. UIAccessibility informal protocol Attributes • shouldGroupAccessibilityChildren Reads in order instead of horizontally • accessibilityElementHidden Accessibility programming
  • 42. Make good labels • Labels briefly describe the element. • They do not include the control type. • They begin with a capitalized word and does not end with a period. • Localized. Accessibility programming
  • 43. Create good hints • Hints describe the results of performing an action. • Only provide one when not obvious. Accessibility programming
  • 44. Create good hints • They briefly describe results. • They begin with a verb and omit the subject. • They use the third person singular declarative form - Plays music instead of play music. Accessibility programming
  • 45. Create good hints • Imagine describing it to a friend: "Tapping the button plays music." • They begin with a capitalized word and ends with a period. • They do not include the action or gesture. • They do not include the name or type of the controller or view. Accessibility programming
  • 46. Traits Traits describe the behavior of an accessible user interface element. Or them with the vertical. For example: for an image that opens a link in Safari, combine the image and link traits. Accessibility programming
  • 47. Traits • UIAccessibilityTraitNone • UIAccessibilityTraitButton • UIAccessibilityTraitLink • UIAccessibilityTraitSearchField • UIAccessibilityTraitImage This trait can be combined with the button or link traits. Accessibility programming
  • 48. Traits • UIAccessibilityTraitSelected For example, a selected table row, or a selected segment in a segmented control. • UIAccessibilityTraitKeyboardKey • UIAccessibilityTraitStaticText • UIAccessibilityTraitSummaryElement This provides summary information when the application starts. Accessibility programming
  • 49. Traits • UIAccessibilityTraitPlaysSound The accessibility element plays its own sound when activated. • UIAccessibilityTraitStartsMediaSession Silences VoiceOver during a media session that should not be interrupted. For example, silence VoiceOver speech while the user is recording audio. • UIAccessibilityTraitUpdatesFrequently Tells VoiceOver to avoid handling continual notifications. Instead it should poll for changes when it needs updated information. Accessibility programming
  • 50. Traits • UIAccessibilityTraitAdjustable • UIAccessibilityTraitAllowsDirectInteraction Allows direct touch interaction. For example, a view that represents a piano keyboard. • UIAccessibilityTraitCausesPageTurn Causes an automatic page turn when VoiceOver finishes reading the text within it. Like in iBooks. • UIAccessibilityTraitNotEnabled Not enabled and does not respond to user interaction. Accessibility programming
  • 51. Set attributes in a custom subclass implementation class MyCustomView < UIView def accessibilityElement? true end def accessibilityLabel BubbleWrap.localized_string(:MyCustomView_label,nil) end def accessibilityHint BubbleWrap.localized_string(:MyCustomView_hint,nil) end # This view behaves like a button. def accessibilityTraits UIAccessibilityTraitButton end end Accessibility programming
  • 52. If you think this code looks simple
  • 53. If you think this code looks simple then you've begun to get the point.
  • 54. Set attributes in the instantiation code class MyCustomViewController < UIViewController def init view=MyCustomView.alloc.init view.accessibilityElement?=true view.accessibilityTraits=UIAccessibilityTraitButton view.accessibilityLabel=BubbleWrap. localized_string(:MyCustomView_label, nil) view.accessibilityHint=BubbleWrap. localized_string(:MyCustomView_hint, nil) end end Accessibility programming
  • 55. Make Picker Views Accessible If you need to, you can use pickerView:accessibilityLabelForComponent: and pickerView:accessibilityHintForComponent: Accessibility programming
  • 56. Make custom container views accessible • If you use UITableView then you don't have to worry. • You need to make the contained elements accessible, but the container not accessible. • Users interact with the elements, not the container. Accessibility programming
  • 57. The container protocol makes the contained elements available as an array. class MultiFacetedView < UIView def accessibilityElements if @accessibility_element.nil? @accessible_elements=Array.new element1=UIAccessibilityElement. alloc.initWithAccessibilityContainer(self) # set attributes @accessibility_elements<<element1 # Perform similar steps for other elements end @accessible_elements end def accessibilityElement? false end ... Accessibility programming
  • 58. The container protocol makes the contained elements available as an array. ... def accessibilityElementCount accessibilityElements.length end def accessibilityElementAtIndex(index) accessibilityElements[index] end def indexOfAccessibilityElement(element) accessibilityElements.find_index(element) end end Accessibility programming
  • 59. Enhance the accessibility of table views class CurrentWeather < UIView def accessibilityLabel weatherCityString=weatherCity.accessibilityLabel weatherTempString=WeatherTemp.accessibilityLabel "#{weatherCityString}, #{weatherTempString}" end end Example: "Philadelphia, 45 degrees" Accessibility programming
  • 60. Make non-textual data accessible A custom view that draws the number of stars for an item's rating. class RatingView <UIView attr_accessor starCount # ... other implementation code here ... def accessibilityLabel if(@starCount==1) ratingString=BubbleWrap.localized_string(:rating_singular_label, "star" else ratingString=BubbleWrap.localized_string(:rating_plural_label, "stars") end "#{@starCount} #{ratingString}" end # ... other implementation code here ... end Example: 1 star. 2 stars. 3 stars. Accessibility programming
  • 61. Notifications • You can observe and post notifications. • Observable notifications come from UIKit or from other accessibility changes. • You observe using the standard notification center. • You post using UIAccessibilityPostNotification. Accessibility programming
  • 62. Notifications UIAccessibilityLayoutChangedNotification • When the layout of the screen changes, such as when an element appears or disappears. • Includes one parameter, either a string which VoiceOver speaks, or an accessibilityElement VoiceOver moves to. Accessibility programming
  • 63. Notifications UIAccessibilityScreenChangedNotification • When a new view appears which comprises a major portion of the screen. • Same parameter as layout changed notification. Accessibility programming
  • 64. Notifications • UIAccessibilityPageScrolledNotification • UIAccessibilityAnnouncementNotification Posted to make VoiceOver say something. • UIAccessibilityAnnouncementDidFinishNotification Causes an automatic page turn when VoiceOver finishes reading the text within it. Like in iBooks. • UIAccessibilityTraitNotEnabled Not enabled and does not respond to user interaction. Accessibility programming
  • 65. Make dynamic elements accessible • Make sure methods return up to date information. • Send a UIAccessibilityScreenChangedNotification. Accessibility programming
  • 66. Make dynamic elements accessible class BigKey < UIView # A custom keyboard key def accessibilityLabel keyLabel=KeyLabel.accessibilityLabel if(self.letterKey?) if(self.shifted?) keyLabel.upcase else keyLabel.downcase end end else keyLabel end end ... Accessibility programming
  • 67. Make dynamic elements accessible ... def accessibilityTraits traits=super.accessibilityTraits| UIAccessibilityTraitKeyboardKey if(self.shiftKey?&&self.selected?) traits|=UIAccessibilityTraitSelected end traits end def keyboardChangedToNumbers # perform number change here UIAccessibilityPostNotification(UIAccessibilityLayoutChange dNotification, nil) end end Accessibility programming
  • 68. Make dynamic elements accessible • UIAccessibilityAction Informal Protocol. A way to implement specific actions on accessibility objects • accessibilityPerformEscape Dismisses a modal view and returns the success or failure of the action • accessibilityPerformMagicTap • accessibilityScroll Scrolls content and returns success or failure. Takes UIAccessibilityScrollDirection as a parameter. Accessibility programming
  • 69. Make dynamic elements accessible • accessibilityDecrement • accessibilityIncrement Works with the UIAccessibilityTraitAdjustable  Accessibility programming
  • 70. App developing for the blind I get more done in Ruby
  • 71. App developing for the blind I get more done in Ruby I think Ruby sounds better with speech.
  • 72. App developing for the blind XCode works horribly
  • 73. App developing for the blind I need a beer
  • 74. App developing for the blind I need just to open a beer XCode
  • 75. App developing for the blind Give me:
  • 76. App developing for the blind Give me: iMac
  • 77. App developing for the blind Give me: + iMac Ruby
  • 78. App developing for the blind Give me: + + + iMac Ruby Terminal
  • 79. App developing for the blind Give me: iMac No simulator Ruby Terminal
  • 80. App developing for the blind Give me: iMac No simulator The iOS simulator doesn't work well with VoiceOver Ruby Terminal
  • 81. App developing for the blind Give me: iMac No simulator The iOS simulator doesn't work well with VoiceOver Ruby Always better to test it on the device Terminal
  • 82. App developing for the blind Give me: iMac No simulator The iOS simulator doesn't work well with VoiceOver Ruby Always better to test it on the device The Accessibility Inspector doesn't tell everything. Terminal
  • 83. App developing for the blind RubyMotion Debugger • Based on GDB, it can connect to and introspect RubyMotion processes. • It works effectively, still the experience could use improving. • The developers plan to build a higher level and friendlier debugger.
  • 84. App developing for the blind Interface Builder has no accessibility. • I had to learn how to build views programmatically. • I think of the screen either as objects relative to each other, or as objects positioned absolutely on a screen.
  • 85. App developing for the blind Geomotion • It helped me finally understand iOS geometry and gave me that ah ha moment! • CGRect.make helps  understand the code. • Methods such as below and beside help lay out elements relative to each other.
  • 86. App developing for the blind Teacup • Percents help lay out screens based on absolute location. • A non-verbose syntax sounds better. • The less pixel math the better.
  • 87. App developing for the blind Functional tests improve Accessibility • Functional tests use the accessibility label. • This forces properly labeled buttons, the biggest complaint.
  • 88. App developing for the blind Conclusion
  • 89. App developing for the blind Conclusion • RubyMotion increases productivity for the sighted and especially the blind, and it will only get better.
  • 90. App developing for the blind Conclusion • RubyMotion increases productivity for the sighted and especially the blind, and it will only get better. • The iPhone allows the blind to do wonderful things.
  • 91. App developing for the blind Conclusion • RubyMotion increases productivity for the sighted and especially the blind, and it will only get better. • The iPhone allows the blind to do wonderful things. • In most cases you can make your app accessible with little effort.
  • 92. App developing for the blind Conclusion • RubyMotion increases productivity for the sighted and especially the blind, and it will only get better. • The iPhone allows the blind to do wonderful things. • In most cases you can make your app accessible with little effort. • It's the right thing to do.
  • 93. App developing for the blind If Apple wouldn't have made the iPhone accessible
  • 94. App developing for the blind I wouldn't stand here now giving this talk.
  • 95. Rubymotion & Accessibility Austin Seraphin Accessibility consultant @AustinSeraphin AustinSeraphin.com Special thanks to For the visuals For being such an italian-label.com amazing community IndyHall.org advertising