There are a lot of reasons HIV exposure laws don’t work well: they treat HIV differently than any other disease (because they were originally designed as anti-homosexual laws), and the “knowingly” part discouraged people from getting tested, which is worse for public health. The law referenced in the OP article is about consent, not disease transmission.