Add class to variation generated with display function, missed in #4605

With pull request #4605 the display function was overlooked and the class was not added here.