This has happened. We've come to know about it through reading the news like anyone else, or by having the user's co-workers contact us to let us know. On the public site, we don't do anything. The account (and thus attribution) to all of their contributions remain normalized.
If we're contacted by a verifiable family member, we can sometimes make some accommodations on a case-by-case basis depending on the needs and goals, but we can't offer any guarantee. This gets especially tricky if the scenario presents internationally. But, we have no plans to have a system in place where designated accounts can take certain actions.
On a Team or Enterprise instance, however, it's up to the administrator.
The part of an account that's linked to an account on a team would be left to whatever the organizational policy of that team says. That's .. not up to us. But, the two presences are completely separate for those kinds of concerns.
I think it would be kind of cool to have my Stack Overflow account up for years and years after I die and decades from now someone finds a question or an answer I have posted interesting.
Me too. And I think you can fully expect future "digital archaeologists" to really appreciate the perspective your contributions lend, and the database dumps to the Internet Archive essentially guarantee that all contributions that remained visible for at least a few months become potential time capsules in a hundred years or so.
Kinda ... humbling :) It's something I often think about.