He was opposed to the system of former Tunisian President Zine El Abidine Ben Ali. He was isolated in 2001 from the judiciary and confiscated his property, after sending a message to President Ben Ali criticizing the Tunisian judiciary mode. After the Tunisian revolution, the Administrative Court overturned, on March 23, 2011, the judgement against him in 2001.
Following the court decision, he returned to the legal profession.
Then he was appointed in February 2012, Chairman of the National Commission for the Protection of Personal Data. Yahyaoui died according to a preliminary medical report cardiac arrest on September 22, 2015 in Teskrayah in the village of Ghazaleh from the region of Bizerte.
He was transferred to the regional hospital First Rate (at Lloyd's) Habib Boktefh in Bizerte and then to the Charles Nicolle Hospital in Tunis. Honors and
Following the Tunisian revolution, Yahyaoui became as a national figure a member of the Higher Authority for Realisation of the Objectives of the Revolution, Political Reform and Democratic Transition in 2011.