title: What is the difference between Android focusable and importantForAccessibility when using TalkBack?
body: <p>I have noticed that in many situations <code>android:importantForAccessibility="yes"</code> can be replaced by <code>android:focusable="true"</code> and work exactly the same with TalkBack. When should <code>android:importantForAccessibility="yes"</code> be used instead of using focusable?</p>
  
  <p>Android defines <code>android:importantForAccessibility</code> as:</p>
  
  <blockquote>
    <p>Describes whether or not this view is important for accessibility. If it is important, the view fires accessibility events and is reported to accessibility services that query the screen. Note: While not recommended, an accessibility service may decide to ignore this attribute and operate on all views in the view tree. <a href="https://developer.android.com/reference/android/view/View.html#attr_android:importantForAccessibility" rel="noreferrer">https://developer.android.com/reference/android/view/View.html#attr_android:importantForAccessibility</a></p>
  </blockquote>
  
  <p>And <code>android:focusable="true"</code> as:</p>
  
  <blockquote>
    <p>Controls whether a view can take focus. By default, this is "auto" which lets the framework determine whether a user can move focus to a view. By setting this attribute to true the view is allowed to take focus. By setting it to "false" the view will not take focus. This value does not impact the behavior of directly calling requestFocus(), which will always request focus regardless of this view. It only impacts where focus navigation will try to move focus.
    <a href="https://developer.android.com/reference/android/view/View.html#attr_android:focusable" rel="noreferrer">https://developer.android.com/reference/android/view/View.html#attr_android:focusable</a></p>
  </blockquote>