MDL-72511 calendar: Fix month_mini navigation

* Hide arrow icons from assistive technologies.
* Add a more sensible aria-label for the previous/next
month links.
This commit is contained in:
Jun Pataleta
2025-08-19 11:25:55 +08:00
parent 60e348ff05
commit ba51ff55bb
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -51,8 +51,9 @@
}} title="{{#str}}monthprev, calendar{{/str}}"{{!
}} data-year="{{previousperiod.year}}"{{!
}} data-month="{{previousperiod.mon}}"{{!
}} aria-label="{{#str}}monthprevwithname, calendar, {{previousperiodname}}{{/str}}" {{!
}}>
<span class="arrow">{{{larrow}}}</span>
<span class="arrow" aria-hidden="true">{{{larrow}}}</span>
</a>
<span class="hide"> | </span>
<span class="current">
@@ -65,8 +66,9 @@
}} title="{{#str}}monthnext, calendar{{/str}}"{{!
}} data-year="{{nextperiod.year}}"{{!
}} data-month="{{nextperiod.mon}}"{{!
}} aria-label="{{#str}}monthnextwithname, calendar, {{nextperiodname}}{{/str}}" {{!
}}>
<span class="arrow">{{{rarrow}}}</span>
<span class="arrow" aria-hidden="true">{{{rarrow}}}</span>
</a>
{{/includenavigation}}
{{^includenavigation}}
+2
View File
@@ -181,7 +181,9 @@ $string['mon'] = 'Mon';
$string['monday'] = 'Monday';
$string['monthly'] = 'Monthly';
$string['monthnext'] = 'Next month';
$string['monthnextwithname'] = 'Next month: {$a}';
$string['monthprev'] = 'Previous month';
$string['monthprevwithname'] = 'Previous month: {$a}';
$string['monththis'] = 'This month';
$string['more'] = 'More';
$string['moreevents'] = '{$a} more';