firefox-echo-show icon indicating copy to clipboard operation
firefox-echo-show copied to clipboard

[a11y] Homescreen button remains focused when opening home screen despite it being disabled

Open mcomella opened this issue 7 years ago • 4 comments

Originally filed as https://github.com/mozilla-mobile-skunkworks/firefox-connect/issues/427

Steps to reproduce

  • Enable VoiceView
  • Go to a web site
  • Click home screen button

Expected behavior

Home screen appears and home screen or overlay (to dismiss) are focused

Actual behavior

Home screen appears but the home screen button, which is now disabled, is focused. Linear navigation no longer works until a new view is focused with spatial navigation

Device information

  • Echo Show device: any gen
  • Firefox version: v1.1+

@eeejay Android discourages you from manually refocusing elements for a11y purposes but focusing the now disabled home button, which also breaks spatial navigation, seems broken. Do you know what the desired behavior should be here? I attached an annotated screenshot for reference: device-2018-10-31-114346

mcomella avatar Oct 31 '18 18:10 mcomella

Eitan mentioned that the homescreen is conceptually a dialog. On Android, focus typically moves to the first item in the dialog so that would be the appropriate behavior here too.

mcomella avatar Nov 14 '18 22:11 mcomella

Retest after #117

athomasmoz avatar Dec 19 '18 19:12 athomasmoz

I'm struggling to get this to work. In BF, I tried:

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        ...
        overlay.onGlobalLayoutOnce {
            overlay.homeTiles.findViewHolderForLayoutPosition(0).itemView.requestFocus()
        }

In various combinations of requesting focus on the RecyclerView or its children and nothing seems to happen.

I also tried:

        launch(UI) {
            delay(3000)
            overlay.homeTiles.findViewHolderForLayoutPosition(1).itemView.requestFocus()
        }

But this also doesn't seem to work.

mcomella avatar Jan 15 '19 02:01 mcomella

I was unable to fix this in #162.

mcomella avatar Jan 16 '19 00:01 mcomella