I think this legislation can only be enforced in US waters since that is the only place where US has authority. Legal authority depends on where a crime happens, even if it is a US citizen. If a crime happens at a resort in Mexico, the Mexican authorities deal with it. Same if the ship is in Mexican waters. And since most ships are registered under other countries, they have no obligation to follow the other safety laws. The US can ban the ships from US ports but they would lose too much money. And most cruisers would still go whether these changes are made or not.
Luckily, the cruise lines also don't want to lose money, so they will voluntarily make the safety changes.