The ‘historic’ bill has been praised by trade unions and MPs who pushed to get it through the House of Lords