Uiautomatorviewer - What does NAF mean?

His understanding is that UIAutomator cannot automate any elements where NAF = true in uiautomatorviewer. Ive been looking high and low, but I can't let my life find what NAF means. Somebody knows?

+8
android-uiautomator uiautomator
source share
3 answers

" Inaccessibility friendly "

These are user interface elements that appear to be interactive, but which do not have accessibility, such as content descriptions.

From source AccessibilityNodeInfoDumper.java (part of uiautomator):

/** * We're looking for UI controls that are enabled, clickable but have no * text nor content-description. Such controls configuration indicate an * interactive control is present in the UI and is most likely not * accessibility friendly. We refer to such controls here as NAF controls * (Not Accessibility Friendly) * * @param node * @return false if a node fails the check, true if all is OK */ private static boolean nafCheck(AccessibilityNodeInfo node) { boolean isNaf = node.isClickable() && node.isEnabled() && safeCharSeqToString(node.getContentDescription()).isEmpty() && safeCharSeqToString(node.getText()).isEmpty(); if (!isNaf) return true; // check children since sometimes the containing element is clickable // and NAF but a child text or description is available. Will assume // such layout as fine. return childNafCheck(node); } 
+9
source share

NAF stands for Inaccessibility for Convenience.

+7
source share

When the UIAutomator detects some problem while parsing the XML Layout Android Application , its node is marked as NAF "Not Accessibility Friendly" . We could not automate these elements.

+1
source share

All Articles