Hey Thomas,
What you’re expecting is already an existing AEM feature. If it’s not working in your instance, it’s possible that your developer has overridden the out-of-the-box clientlibs, which may be affecting the functionality. I suggest cross-checking this internally.
Thanks,