focus On Reading Position
Focus on the page and/or element best matching the reading position inside the WebView.
Please note that this method only sets focus inside the WebView.
You may need to set focus on the ColibrioReadingSystemView before calling this method. First make sure you have set colibrioReadingSystemView.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_YES
. Then use colibrioReadingSystemView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)
to set focus on the ColibrioReadingSystemView.
By focusing on publication content, your app give accessibility technologies such as screen readers an intent where to start reading. Depending on what browser, platform and accessibility technology you are targeting, you might need to experiment with the options you pass to this method in order to get the desired behavior.
The focus action will be applied after any ongoing navigation has completed and visible content has finished rendering. Thus, this method is safe to call immediately after a call to any navigation method such as goTo(), next() or previous().
Calls onSuccess when the focus() action has been applied. Calls onError if the focus could not be applied due to an error.
Focus on the page and/or element best matching the reading position inside the WebView.
Please note that this method only sets focus inside the WebView.
You may need to set focus on the ColibrioReadingSystemView before calling this method. First make sure you have set colibrioReadingSystemView.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_YES
. Then use colibrioReadingSystemView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)
to set focus on the ColibrioReadingSystemView.
By focusing on publication content, your app give accessibility technologies such as screen readers an intent where to start reading. Depending on what browser, platform and accessibility technology you are targeting, you might need to experiment with the options you pass to this method in order to get the desired behavior.
The focus action will be applied after any ongoing navigation has completed and visible content has finished rendering. Thus, this method is safe to call immediately after a call to any navigation method such as goTo(), next() or previous().
Return
Either ColibrioResult.Success when the focus() action has been applied, or ColibrioResult.Error if the focus could not be applied due to an error.