The investigation of the optical properties of extended 2-(2-hydroxyphenyl)benzazole dyes showed a complete frustration of the excited-state intramolecular proton transfer (ESIPT) process leading to a novel family of highly fluorescent fluorophores. In the case of a benzothiazole ring, restoration of ESIPT can be observed in acidic medium leading to ratiometric sensing. These experimental results have been rationalised by first-principle calculations.