code: public static boolean isIdFocusable(final WComponent root, final String id) {
  
  		FindComponentByIdVisitor visitor = new FindComponentByIdVisitor(id) {
  			@Override
  			public VisitorResult visit(final WComponent comp) {
  				VisitorResult result = super.visit(comp);
  				// If hidden then abort branch
  				if (result == VisitorResult.CONTINUE && comp.isHidden()) {
  					return VisitorResult.ABORT_BRANCH;
  				}
  				return result;
  			}
  		};
  
  		// Only traverse visible
  		doTraverse(root, true, visitor);
  
  		// Check if matching component is hidden
  		ComponentWithContext result = visitor.getResult();
  		return result == null ? false : !result.getComponent().isHidden();
  	}
docs: Check if this ID is focusable.
  <p>
  Considered focusable if the component and all its ancestors are visible and not hidden.
  </p>
  
  @param root the root component to search from.
  @param id the id to search for.
  @return the component with context if it is focusable, otherwise null