From 80148a8435815c1d750cbbb67a5976c0008a1ba6 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Tue, 10 Jun 2025 20:39:43 +0200 Subject: [PATCH] [A11y] Widget: move dialog-focus to close-button (#5221) --- src/pretix/static/pretixpresale/js/widget/widget.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pretix/static/pretixpresale/js/widget/widget.js b/src/pretix/static/pretixpresale/js/widget/widget.js index ce474d03a4..e98d61e615 100644 --- a/src/pretix/static/pretixpresale/js/widget/widget.js +++ b/src/pretix/static/pretixpresale/js/widget/widget.js @@ -903,6 +903,14 @@ Vue.component('pretix-overlay', { } } }, + '$root.frame_shown': function (newValue) { + if (newValue) { + var btn = this.$el?.querySelector('.pretix-widget-frame-close button'); + this.$nextTick(function() { + btn.focus(); + }); + } + }, }, computed: { frameClasses: function () {