Hi,
maybe someone else will provide a better and more accurate answer, but as far as I know, Cisco switches use IEEE BPDUs on access ports, therefore they have no information about VLANs whatsoever. And due to the fact that IEEE BPDU doesn't carry VLAN ID in it, there won't be any problems with VLAN ID mismatch or something similar on such link.
STP will elect the root bridge by the book according to normal STP operation (Lowest Bridge ID[Bridge Priority+MAC Address]).
And regarding the connectivity - I believe that you know why you do have connectivity although these switches are in different VLANs, but please, let us know if you want an explanation for that as well.
Best regards,
Jan