Even without height attribute on the slider the height is correct if an image with same dimension is placed after the slides. To optimize browser cache use the first image. Else this text would not be visible since it would be behind the slider since slides have absolute CSS.
If we would use javascript to set the height we would get penalized by google since there would a cumulate layout shift (CLS)