Mayor Bill de Blasio signed legislation Wednesday that overhauls the city’s management of Hart Island, the largest potter’s field in the nation where an estimated million New Yorkers were laid to rest.

“Folks who have been buried on Hart Island over generations — they are New Yorkers, they are part of the fabric of our life,” de Blasio said at a City Hall bill-signing ceremony Wednesday.

“New York City will not accept injustice in life or in death. It’s important to recognize that an injustice was done to so many and we will not let that be the way the story ends,” de Blasio said.

The four bills inked by de Blasio will overhaul the management of the Bronx’s island, where the city’s indigent, unidentified and unclaimed dead were buried in mass graves that are marked with simple white placards.

The legislation moves management of the island from the Corrections Department to the Parks Department, requires City Hall to come up with a plan to increase public access to the island and establishes an office to handle burial services.

Family members of the deceased were barred from visiting the potter’s field until 2014. Even then, visits were tightly controlled by DOC, the agency whose prisoners at nearby Rikers Island dug the graves.

“I want to tell my daughter and all of her million friends that are there with her that they now have dignity,” Elaine Jospeh said at the bill-signing ceremony.

Joseph’s 5-day-old daughter, Tomiko, was buried on Hart Island in 1978 because of a bureaucratic screw-up. The 65-year-old retired nurse’s story was featured recently in The Post.

The push to improve access to Hart Island gained steam in recent years after activists discovered it was the final resting place for thousands of AIDS victims who were denied proper burials because of the stigma surrounding the disease.

FX’s groundbreaking drama “Pose” featured the plight in an episode that aired earlier this year.

Joseph said the changes transform Hart Island into “a beautiful park not under the direction of the penal system.”

De Blasio also signed a bill that increases the salaries for building service workers like handymen and porters at larger city-funded affordable housing developments to nearly $52,000 plus benefits.