A triazole derivative containing trifluoromethyl and diphenol unit was synthesized as a fluorescent 'turn-on' chemosensor for Al3+ and Zn2+ ions with high sensitivity, a rapid response time and specific selectivity over other cations.