That wasn't a crime. However, the judge putting her in jail for citing the Fifth Amendment to the US Constitution is a travesty. We may not like her fooling around, but what is happening to her, if allowed to stand, could have dire consequences to the country.
The Fifth Amendment only applies in criminal matters.
Divorce is a civil matter.
What crime is she charged with, or in danger of being charged with, related to the testimony she refused to give, in a pending child custody/visitation case?
None. The 5th Amendment does not protect you from being forced to give testimony that makes you look stupid, costs you a lot of money, or gets you jailed for contempt of court for violating an order giving your soon to be ex-husband partial custody of your child. There is zero constitutional issue here. You just have a woman who violated a court order, and refused to provide answers about that violation court.