theKashey / vue-focus-lock

It is a trap! A lock for a Focus. A11y util for scoping a focus.
MIT License
138 stars 14 forks source link

IT'S A TRAP slot text showing when using v-if #11

Closed fvanderwielen closed 5 years ago

fvanderwielen commented 5 years ago

The slot text of "It is a Trap" shows when the content of vue-focus-lock does not exist, via v-if directive for example. a v-f in the content might be used for a modal, for which focus lock is required and vue-focus-lock is very useful.

This can be fixed by the developer by placing the v-if directive on vue-focus-lock itself or otherwise, but the unaware developer might accidentally bleed that text towards a screenreader, which decreases accessibility a little as the user gets confused by nonsensical (but funny :P) text.