The Widal test is a serological test used to diagnose typhoid fever, a serious infectious disease caused by the bacterium Salmonella enterica serovar Typhi. The test detects the presence of antibodies against the O (somatic) and H (flagellar) antigens of Salmonella Typhi, which are produced in response to the infection.