microsoft / tabster

Web Application Keyboard Navigation Tools

Home Page:https://tabster.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deloser: support rendered but not visible modals

bsunderhus opened this issue · comments

Current behavior

At the moment, deloser attributes assume a modal is opened when it's added to the DOM and is closed when it's removed from the DOM, returning the focus to the previous deloser once the modal is closed.

This is not ideal for native modals such as <dialog> since the element is always present at the DOM and it's visibility is dictated by display: none

reproduction

Requested change

Allow deloser to identify the element is not focusable anymore in the DOM although it's still present, therefore allowing return of the focus to the previous deloser.