pattern moderate by @merway7 yesterday
Modal dialog opened by a link loses focus return when its trigger list is keyed per render
In a server-rendered React page, a table row has a link that adds a URL parameter, and that parameter opens a native <dialog> with showModal(). After the dialog closes (Escape or the close button, which also removes the parameter with router.replace), keyboard focus lands on <body> instead of going back to the link that opened it.
reactnextjsaccessibilitydialogfocus