vuematerial / vue-material

Vue.js Framework - ready-to-use Vue components with Material Design, free forever.
https://www.creative-tim.com/vuematerial
MIT License
9.88k stars 1.16k forks source link

md-dialog allows tabbing / keypresses escaping. #2328

Open ryantheleach opened 3 years ago

ryantheleach commented 3 years ago

Using the demo on https://vuematerial.io/components/dialog, despite appearing as a modal, md-dialog has no method of trapping focus, or preventing key events escaping.

Steps to reproduce

open a demo dialog on https://vuematerial.io/components/dialog

press tab, when focus is inside the dialog, note that you can tab through the navigation behind it.

Which browser?

Google Chrome Version 90.0.4430.212 (Official Build) (64-bit)

What is expected?

It is expected that a modal dialog prevents focus leaving the dialog until closed. It is expected that shortcut keys pressed relevent to the dialog, do not affect the rest of the application / site.

What is actually happening?

Focus is allowed to escape, despite a <md-focus-trap> being used.