Get tab labels of visible relationships in a Form

Hi Community,

does anybody know a simple way to get the tab labels of the visible relationships in a Form?

I know that we can use the following code:
--> var tabbar = parent.relationships.relTabbar;

But this one will return an array of all relationships, also the ones that are hidden to the user.

Let´s assume I have the Form above. An onClick button event shall return the labels of all visible tabs -> Files, NDA Files, Related Parts, Vendors
What can I do? I made a few tests with the querySelector, but weren´t able to get the tab-container element at all.

Thanks for any help!

Angela