The Senate gave unanimous final approval to a bill that would allow parents, guardians or other legal representatives of a deceased child to gain access to the minor’s online accounts.

With a written request and a copy of a death certificate, a personal representative would then be entitled to obtain access to a minor’s digital assets within 30 days.

“This really is the first step,” said Del. Thomas C. Wright Jr. (R-Lunenburg), who said his bill is among early efforts in state legislatures around the country to define the guidelines for dealing with digital assets as part of an estate.

“It is particularly important for parents to access [social media accounts] whenever their children die for whatever reason or commit suicide. That will help them find answers.”

His bill was prompted by the experience of Ricky and Diane Rash, a Nottoway County couple who were frustrated by their inability to gain access to their son Eric’s Facebook account after his suicide in January 2011.

But Facebook and other Internet services have found themselves in the difficult position of trying to guard users’ privacy, as required by law, and helping families deal with the online remains of a loved one who died.

Facebook also has a policy that lets a deceased person be memorialized by allowing friends and family to post remembrances and honor the person’s memory.

To memorialize an account, a loved one must provide evidence of the death, such as an obituary or a news article.

Facebook also honors requests from family members to deactivate the account, which removes the profile and associated information from the site.

Wright’s bill, which passed the House by a vote of 96 to 4, now moves to the governor’s desk.