fixes #17380 Use baseClass of widgets instead of data-dojo-type which is not relevant for forms created programmatically