Wigan are now level on points with Town, but are ahead on goal difference. Town have a game in hand however, which takes place on Monday at Wolverhampton. Defeat for Cardiff however kept the home side deep in relegation mire at the bottom of the table.
Wigan took an undeserved lead six minutes after the restart when an unmarked Stephen McMillan was given time to cross into the area and Roberts rose high to head into the corner of the net.
Five minutes from time a mistake by Richard Langley gave Kavanagh a clear shooting chance, but instead he threaded a pass across field to Mahon and the unmarked former Blackburn and Ipswich midfielder calmly slotted the ball into the net.
Click here for a full report on the game via Sportbox.tv, the very first free live video sports web station.