The opposition leader has talked up his working-class origins as he seeks to connect with voters ahead of the federal election.