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