My end goal is to loop through the errors and work out whether the field generating the error is currently hidden in a tab that's not visible or an accordion section that's closed.
I imagine there would be a number of use cases though where it would be useful to loop through the errors and pull more information. Is this possible?