Iris dilation is primarily a response to light levels, not focus depth. Focus comes from stretching the lens behind the iris, which is possible to sense externally, but much more difficult.
I'm not really sure it's active, but still, the question of how you get something on a surface to become visible when you focus meters beyond that surface remains.