mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
[A11y] Widget: change calendar table aria-label to labelledby (#5217)
This commit is contained in:
committed by
GitHub
parent
80148a8435
commit
23489f50f8
@@ -1571,14 +1571,14 @@ Vue.component('pretix-widget-event-calendar', {
|
|||||||
+ '<a class="pretix-widget-event-calendar-previous-month" href="#" @click.prevent.stop="prevmonth">« '
|
+ '<a class="pretix-widget-event-calendar-previous-month" href="#" @click.prevent.stop="prevmonth">« '
|
||||||
+ strings['previous_month']
|
+ strings['previous_month']
|
||||||
+ '</a> '
|
+ '</a> '
|
||||||
+ '<strong>{{ monthname }}</strong> '
|
+ '<strong :id="aria_labelledby">{{ monthname }}</strong> '
|
||||||
+ '<a class="pretix-widget-event-calendar-next-month" href="#" @click.prevent.stop="nextmonth">'
|
+ '<a class="pretix-widget-event-calendar-next-month" href="#" @click.prevent.stop="nextmonth">'
|
||||||
+ strings['next_month']
|
+ strings['next_month']
|
||||||
+ ' »</a>'
|
+ ' »</a>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
|
|
||||||
// Calendar
|
// Calendar
|
||||||
+ '<table class="pretix-widget-event-calendar-table" :id="id" tabindex="0" v-bind:aria-label="monthname">'
|
+ '<table class="pretix-widget-event-calendar-table" :id="id" tabindex="0" v-bind:aria-labelledby="aria_labelledby">'
|
||||||
+ '<thead>'
|
+ '<thead>'
|
||||||
+ '<tr>'
|
+ '<tr>'
|
||||||
+ '<th aria-label="' + strings['days']['MONDAY'] + '">' + strings['days']['MO'] + '</th>'
|
+ '<th aria-label="' + strings['days']['MONDAY'] + '">' + strings['days']['MO'] + '</th>'
|
||||||
@@ -1605,6 +1605,9 @@ Vue.component('pretix-widget-event-calendar', {
|
|||||||
id: function () {
|
id: function () {
|
||||||
return this.$root.html_id + "-event-calendar-table";
|
return this.$root.html_id + "-event-calendar-table";
|
||||||
},
|
},
|
||||||
|
aria_labelledby: function () {
|
||||||
|
return this.$root.html_id + "-event-calendar-table-label";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
back_to_list: function () {
|
back_to_list: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user