From 9240c96339b26989f060c57c61a2677e2f1e502e Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Wed, 18 Jun 2014 08:35:48 -0400 Subject: [PATCH] Improve accessibility on attachments list: use custom tabindex attribute + add aria-label for meaningful voice output on delete icons --- program/steps/mail/compose.inc | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 6f1267d..a3c8a8a 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -1524,7 +1524,9 @@ 'href' => "#delete", 'title' => $RCMAIL->gettext('delete'), 'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", rcmail_output::JS_OBJECT_NAME, $id), - 'class' => 'delete' + 'class' => 'delete', + 'tabindex' => $attrib['tabindex'] ?: '0', + 'aria-label' => $RCMAIL->gettext('delete') . ' ' . $a_prop['name'], ), $button ) . rcube::Q($a_prop['name']) @@ -1550,6 +1552,12 @@ $OUTPUT->set_env('attachments', $jslist); $OUTPUT->add_gui_object('attachmentlist', $attrib['id']); + // put tabindex value into data-tabindex attribute + if (isset($attrib['tabindex'])) { + $attrib['data-tabindex'] = $attrib['tabindex']; + unset($attrib['tabindex']); + } + return html::tag('ul', $attrib, $out, html::$common_attrib); } -- Gitblit v1.9.1