diff --git a/src/pretix/static/pretixpresale/js/widget/widget.js b/src/pretix/static/pretixpresale/js/widget/widget.js index 548037ed02..430e578387 100644 --- a/src/pretix/static/pretixpresale/js/widget/widget.js +++ b/src/pretix/static/pretixpresale/js/widget/widget.js @@ -1154,6 +1154,12 @@ Vue.component('pretix-widget-event-form', { } else { this.$root.view = "weeks"; } + + var $el = this.$root.$el; + this.$root.$nextTick(function() { + // wait for redraw, then focus content element for better a11y + $el.focus(); + }); }, calculate_buy_disabled: function() { var i, j, k; @@ -1286,6 +1292,10 @@ Vue.component('pretix-widget-event-list', { }, methods: { back_to_calendar: function () { + // make sure to always focus content element + this.$nextTick(function () { + this.$root.$el.focus(); + }); this.$root.offset = 0; this.$root.append_events = false; if (this.$root.weeks) { @@ -1657,7 +1667,7 @@ Vue.component('pretix-widget-event-week-calendar', { }); Vue.component('pretix-widget', { - template: ('