I don't know of any law that prohibits the disclosure of your choices on a ballot. It would certainly be invalidated on First Amendment grounds.
There are laws outlawing the disclosure of pictures of your ballot, but there is little remaining debate that these laws violate the First Amendment. New Hampshire's ballot-selfie law was invalidated in 2015, and the First Circuit Court of Appeals went a step further in 2016, making it illegal to enforce such a law anywhere else in the circuit:
Even accepting the possibility that ballot selfies will make vote buying and voter coercion easier by providing proof of how the voter actually voted, the statute still fails for lack of narrow tailoring. “[B]y demanding a close fit between ends and means, the tailoring requirement [under intermediate scrutiny] prevents the government from too readily ‘sacrific[ing] speech for efficiency.’ ” ...
New Hampshire has “too readily forgone options that could serve its interests just as well, without substantially burdening” legitimate political speech. At least two different reasons show that New Hampshire has not attempted to tailor its solution to the potential problem it perceives. First, the prohibition on ballot selfies reaches and curtails the speech rights of all voters, not just those motivated to cast a particular vote for illegal reasons. ... Second, the State has not demonstrated that other state and federal laws prohibiting vote corruption are not already adequate to the justifications it has identified. ... New Hampshire suggests that it has no criminal statute preventing a voter from selling votes. That can be easily remedied without the far reach of this statute. The State may outlaw coercion or the buying or selling of votes without the need for this prohibition.
Rideout v. Gardner, 838 F.3d 65, 74 (1st Cir. 2016)
Michigan has agreed to stop enforcing its ballot selfie law, and Indiana has been permanently enjoined from enforcing its law. New York did survive a challenge to its law, but that one is generally considered an outlier.