accordion widget: simplify valid_widget_classes method