On the physics of UV absorption lines and their relations with Lyman continuum escape fractions