We had an issue where Talkback on Chrome was somehow getting to these empty elements. Need to investigate whether adding aria-hidden=true would solve the issue.
When I first saw your implementation for keyboard trap using JQuery I was so excited.
I was waiting for vanilla JS implementation too long so I've implemented it myself a month ago.
Now I've found you did this vanilla JS version and I'm very pleased to see that's my version is very similar to what you've done, I still don't understand why you need outer traps, though.
Thank you very much for what you've done and for the inspiration that you gave me with your JQuery version of this plugin.
If the content is modified the focus elements may not be valid targets anymore. I can resubmit the trap, but that has the extra overhead of re-adding the DOM elements. It would be good if we could just tell the plugin to reselect the first and last focus elements.
Makeup encourages a single source of truth for all accessibility micro behaviour. Therefore we should remove focusableElementsList out of util.js and replace with makeup-focusables dependency.