mirror of https://github.com/ElemeFE/element
Fixes #7959 by providing aria labels for buttons
parent
c1da7a5c86
commit
52bbf4f3e1
|
@ -49,31 +49,37 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="prevYear"
|
@click="prevYear"
|
||||||
|
:aria-label="t(`el.datepicker.prevYear`)"
|
||||||
class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left">
|
class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left">
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="prevMonth"
|
@click="prevMonth"
|
||||||
v-show="currentView === 'date'"
|
v-show="currentView === 'date'"
|
||||||
|
:aria-label="t(`el.datepicker.prevMonth`)"
|
||||||
class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-arrow-left">
|
class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-arrow-left">
|
||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
@click="showYearPicker"
|
@click="showYearPicker"
|
||||||
|
role="button"
|
||||||
class="el-date-picker__header-label">{{ yearLabel }}</span>
|
class="el-date-picker__header-label">{{ yearLabel }}</span>
|
||||||
<span
|
<span
|
||||||
@click="showMonthPicker"
|
@click="showMonthPicker"
|
||||||
v-show="currentView === 'date'"
|
v-show="currentView === 'date'"
|
||||||
|
role="button"
|
||||||
class="el-date-picker__header-label"
|
class="el-date-picker__header-label"
|
||||||
:class="{ active: currentView === 'month' }">{{t(`el.datepicker.month${ month + 1 }`)}}</span>
|
:class="{ active: currentView === 'month' }">{{t(`el.datepicker.month${ month + 1 }`)}}</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="nextYear"
|
@click="nextYear"
|
||||||
|
:aria-label="t(`el.datepicker.nextYear`)"
|
||||||
class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right">
|
class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right">
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="nextMonth"
|
@click="nextMonth"
|
||||||
v-show="currentView === 'date'"
|
v-show="currentView === 'date'"
|
||||||
|
:aria-label="t(`el.datepicker.nextMonth`)"
|
||||||
class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-arrow-right">
|
class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-arrow-right">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,6 +16,10 @@ export default {
|
||||||
startTime: 'Start Time',
|
startTime: 'Start Time',
|
||||||
endDate: 'End Date',
|
endDate: 'End Date',
|
||||||
endTime: 'End Time',
|
endTime: 'End Time',
|
||||||
|
prevYear: 'Previous Year',
|
||||||
|
nextYear: 'Next Year',
|
||||||
|
prevMonth: 'Previous Month',
|
||||||
|
nextMonth: 'Next Month',
|
||||||
year: '',
|
year: '',
|
||||||
month1: 'Jan',
|
month1: 'Jan',
|
||||||
month2: 'Feb',
|
month2: 'Feb',
|
||||||
|
|
|
@ -16,6 +16,10 @@ export default {
|
||||||
startTime: 'Hora Inicial',
|
startTime: 'Hora Inicial',
|
||||||
endDate: 'Fecha Final',
|
endDate: 'Fecha Final',
|
||||||
endTime: 'Hora Final',
|
endTime: 'Hora Final',
|
||||||
|
prevYear: 'Año Anterior',
|
||||||
|
nextYear: 'Próximo Año',
|
||||||
|
prevMonth: 'Mes Anterior',
|
||||||
|
nextMonth: 'Próximo Mes',
|
||||||
year: 'Año',
|
year: 'Año',
|
||||||
month1: 'enero',
|
month1: 'enero',
|
||||||
month2: 'febrero',
|
month2: 'febrero',
|
||||||
|
|
Loading…
Reference in New Issue