summaryrefslogtreecommitdiff
path: root/program/include/rcmail_output_html.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcmail_output_html.php')
-rw-r--r--program/include/rcmail_output_html.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index eb4a52d04..a57165f03 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -1130,6 +1130,15 @@ EOF;
$attrib['alt'] = html::quote($this->app->gettext($attrib['alt'], $attrib['domain']));
}
+ // set accessibility attributes
+ if (!$attrib['role']) {
+ $attrib['role'] = 'button';
+ }
+ if (!empty($attrib['class']) && !empty($attrib['classact']) || !empty($attrib['imagepas']) && !empty($attrib['imageact'])) {
+ $attrib['tabindex'] = '-1'; // disable button by default
+ $attrib['aria-disabled'] = 'true';
+ }
+
// set title to alt attribute for IE browsers
if ($this->browser->ie && !$attrib['title'] && $attrib['alt']) {
$attrib['title'] = $attrib['alt'];