2

I'm trying to loop focus in a dropdown in my webpage while using screen reader in mobile. In dev tools mobile view, I am able to achieve the same. But as soon as I open screen reader in actual device (S10+ or iPhone X), the forward swipe gesture doesn't fire any event. I went on researching and found that browse mode doesn't actually provide focus to any element and just reads it unless tapped.

So, is there any way/method by which we can identify which element is currently active in scree reader browse mode. Or we just can not do it.

function trapFocus(firstElem, lastElem) {
    // shift+tab on first element
    $(firstElem).on('keydown', function(e) {
        if (e.shiftKey && e.keyCode == 9) {
            $(lastElem).focus();
            e.preventDefault();
        }
    });

    // tab on last element with no shift
    $(lastElem).on('keydown', function(e) {
        if (!e.shiftKey && e.keyCode == 9) {
            $(firstElem).focus();
            e.preventDefault();
        }
    });
}
Abhishek Dhanraj Shahdeo
  • 1,356
  • 2
  • 14
  • 35
  • https://stackoverflow.com/questions/31006404/accessibility-android-talkback-doesnt-fire-focus-event-on-html-content – Ankit Balyan May 22 '19 at 07:41
  • There is no event fired on accessibility focus / swipe. https://stackoverflow.com/questions/47315314/android-talkback-not-registering-onfocus-for-web-how-do-i-manipulate-accessibil – Ankit Balyan May 22 '19 at 07:44

0 Answers0