The idea of human rights is constantly in flux. It is subjectively understood and applied. For example, is internet access now a human right? It is not clear what interpretation of human rights should prevail. Not to mention that ‘liberal ideas of human rights’ is a very Eurocentric framing which denies important contributions from other civilizations.
Even interpretation of historical events relative to the present can be subjected to a flux in understanding. If slavery was codified to protect the rights of slave owners and slaves, while also providing for both parties, then this arrangement could be considered better than the economic servitude many laborers find themselves in today.
In fact, most slavery in history was not like the brutality of so called American chattel slavery.