Commit a67e61b3 authored by Jono Mingard's avatar Jono Mingard Committed by Gerrit Code Review
Browse files

Added alt text to datepicker buttons (Bug #1259685)



Added 'Open date picker' language string, used for alt text on the datepicker
button in the calendar pieforms element.

Change-Id: Ie38317148d70c7cfd74cba0be73cf56d46a240ff
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 14e70a78
......@@ -18,6 +18,7 @@ $string['element.bytes.gigabytes'] = 'Gigabytes';
$string['element.bytes.invalidvalue'] = 'Value must be a number';
$string['element.calendar.invalidvalue'] = 'Invalid date/time specified';
$string['element.calendar.opendatepicker'] = 'Open date picker';
$string['element.date.or'] = 'or';
$string['element.date.monthnames'] = 'January,February,March,April,May,June,July,August,September,October,November,December';
......
......@@ -48,11 +48,13 @@ function pieform_element_calendar(Pieform $form, $element) {/*{{{*/
if (isset($element['imagefile'])) {
$result .= '<a href="" id="'. $id . '_btn" onclick="return false;" class="pieform-calendar-toggle"'
. ' tabindex="' . $element['tabindex'] . '">'
. '<img src="' . $element['imagefile'] . '" alt=""></a>';
. '<img src="' . $element['imagefile'] . '" alt="' . get_string('element.calendar.opendatepicker', 'pieforms') . '"></a>';
}
else {
$result .= '<input type="button" id="' . $id . '_btn" onclick="return false;" class="pieform-calendar-toggle"'
. ' value="..." tabindex="' . $element['tabindex'] . '">';
$result .= '<button type="button" id="' . $id . '_btn" onclick="return false;" class="pieform-calendar-toggle"'
. ' tabindex="' . $element['tabindex'] . '">';
$result .= '<span class="accessible-hidden">' . get_string('element.calendar.opendatepicker', 'pieforms') . '</span>';
$result .= '...</button>';
}
// Build the configuring javascript
......
......@@ -953,6 +953,9 @@ function jsstrings() {
'Help',
'closehelp'
),
'pieforms' => array(
'element.calendar.opendatepicker'
)
),
'tablerenderer' => array(
'mahara' => array(
......
......@@ -250,7 +250,7 @@ function makeCalendarLink(item, type) {
'class' : 'pieform-calendar-toggle'},
IMG({
'src': '{{theme_url filename='images/btn_calendar.png'}}',
'alt': ''})
'alt': get_string('element.calendar.opendatepicker', 'pieforms')})
);
return link;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment