Fixed focus and tab index handling for UI (#11129)

Change-Id: I80377792ade11946337e2900a7ea84209ae1d060