SAN FRANCISCO — In second grade, California students will learn about families with two moms or two dads. Two years later, while studying how immigrants have shaped the Golden State, they will hear how New York native Harvey Milk became a pioneering gay politician in San Francisco.

California education officials approved those changes in classroom instruction Thursday to comply with the nation’s first law requiring public schools to include prominent gay people and LGBT rights milestones in history classes.

The State Board of Education adopted the updates as part of a broader overhaul of California’s history and social science curriculum.

“We are proud to represent a diverse state, and we are proud that this framework reflects the state that we serve,” said Lauryn Wild, who chairs the advisory commission that produced the new guidelines.

They weave references to gay Americans and events throughout the history and social science curriculum, starting in second grade through discussions about diverse families and again in fourth grade with lessons on California’s place in the gay rights movement.

The guidelines also touch on the topics in fifth and eighth grade – looking at gender roles in the 18th and 19th centuries and examples of individuals who flouted them – and throughout high school.

A capstone of sorts will come in U.S. government courses, where seniors would learn about the 2015 Supreme Court ruling that legalized same-sex marriage nationwide and recent court cases involving transgender issues.

The changes are designed to satisfy legislation passed by California lawmakers five years ago that added LGBT Americans and people with disabilities to the list of social and ethnic groups whose contributions schools are supposed to teach and must appear in K-8 textbooks.

The law took effect in January 2012, but its implementation was slowed by opponents’ failed attempts to overturn it and other factors.

Twenty scholars affiliated with the American Historical Association offered recommendations, most of which were adopted, said Don Romesburg, chair of the Women’s and Gender Studies Department at Sonoma State University.

The framework “recognizes that whatever your political view or opinion of LGBT rights, LGBT history is a part of American history, and you cannot understand where we are now collectively as Americans without understanding something of the LGBT past,” he said.