Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Fix Accessibility issues with using single email / email to 50 … #30691

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CRM/Contact/Form/Task/EmailTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,20 @@ public function buildQuickForm() {

$emailAttributes = [
'class' => 'huge',
'title' => ts('Send email to'),
];
$this->add('text', 'to', ts('To'), $emailAttributes, TRUE);

$this->addEntityRef('cc_id', ts('CC'), [
'entity' => 'Email',
'multiple' => TRUE,
'title' => ts('CC Contacts'),
]);

$this->addEntityRef('bcc_id', ts('BCC'), [
'entity' => 'Email',
'multiple' => TRUE,
'title' => ts('BCC Contacts'),
]);

$setDefaults = TRUE;
Expand Down Expand Up @@ -239,7 +242,7 @@ public function buildQuickForm() {

$this->add('text', 'subject', ts('Subject'), ['size' => 50, 'maxlength' => 254], TRUE);

$this->add('select', 'from_email_address', ts('From'), $this->getFromEmails(), TRUE, ['class' => 'crm-select2 huge']);
$this->add('select', 'from_email_address', ts('From'), $this->getFromEmails(), TRUE, ['class' => 'crm-select2 huge', 'title' => ts('From Email Address')]);

CRM_Mailing_BAO_Mailing::commonCompose($this);

Expand All @@ -260,19 +263,21 @@ public function buildQuickForm() {
'create' => TRUE,
'api' => ['params' => ['is_deceased' => 0]],
],
'title' => ts('Assigned To'),
],
'followup_activity_type_id' => [
'type' => 'select',
'label' => ts('Followup Activity'),
'attributes' => ['' => '- ' . ts('select activity') . ' -'] + CRM_Core_PseudoConstant::ActivityType(FALSE),
'extra' => ['class' => 'crm-select2'],
'extra' => ['class' => 'crm-select2', 'title' => ts('Followup Activity')],
],
'followup_activity_subject' => [
'type' => 'text',
'label' => ts('Subject'),
'attributes' => CRM_Core_DAO::getAttribute('CRM_Activity_DAO_Activity',
'subject'
),
'title' => ts('Followup Actvity Subject'),
],
];

Expand Down
2 changes: 1 addition & 1 deletion CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@ public static function commonCompose(&$form) {

$form->add('select', "{$prefix}template", ts('Use Template'),
['' => ts('- select -')] + $templates[$prefix], FALSE,
['onChange' => "selectValue( this.value, '{$prefix}');", 'class' => 'crm-select2 huge']
['onChange' => "selectValue( this.value, '{$prefix}');", 'class' => 'crm-select2 huge', 'title' => ts('Use Template')]
);
}
if (\CRM_Core_Permission::check('edit message templates')) {
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Activity/Form/FollowUp.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="crm-accordion-body">
<table class="form-layout-compressed">
<tr class="crm-{$type}activity-form-block-followup_activity_type_id">
<td class="label">{ts}Schedule Follow-up Activity{/ts}</td>
<td class="label">{ts}Schedule Follow-up Activity{/ts}</td>
<td>
{$form.followup_activity_type_id.html}&nbsp;&nbsp;
{ts}on{/ts} {$form.followup_date.html}
Expand Down
5 changes: 3 additions & 2 deletions templates/CRM/Contact/Form/Task/Email.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<td>{$form.from_email_address.html} {help id="id-from_email" file="CRM/Contact/Form/Task/Help/Email/id-from_email.hlp" title=$form.from_email_address.label}</td>
</tr>
<tr class="crm-contactEmail-form-block-recipient">
<td class="label">{if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if}</td>
<td class="label">{if $single eq false}<label for="to">{ts}Recipient(s){/ts}</label>{else}{$form.to.label}{/if}</td>
<td>
{$form.to.html} {help id="id-to_email" file="CRM/Contact/Form/Task/Email.hlp"}
</td>
Expand Down Expand Up @@ -59,7 +59,8 @@
<td class="label">{$form.subject.label}</td>
<td>
{$form.subject.html|crmAddClass:huge}&nbsp;
<input class="crm-token-selector big" data-field="subject" />
<label for="subject-tokens" style="display: none; visibility: hidden;">Subject Tokens</label>
<input id="subject-tokens" class="crm-token-selector big" data-field="subject" />
{help id="id-token-subject" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"}
</td>
</tr>
Expand Down
8 changes: 6 additions & 2 deletions templates/CRM/Contact/Form/Task/EmailCommon.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
</summary>
<div class="crm-accordion-body">
<div class="helpIcon" id="helphtml">
<input class="crm-token-selector big" data-field="html_message" />
<label style="visibility: hidden; display: none;" for="token-html">{ts}HTML message tokens{/ts}</label>
<input id="token-html" class="crm-token-selector big" data-field="html_message" />
{help id="id-token-html" file="CRM/Contact/Form/Task/Email.hlp"}
</div>
<div class="clear"></div>
<span class="sr-only">{$form.html_message.label}</span>
<div class='html'>
{$form.html_message.html}<br />
</div>
Expand All @@ -32,10 +34,12 @@
</summary>
<div class="crm-accordion-body">
<div class="helpIcon" id="helptext">
<input class="crm-token-selector big" data-field="text_message" />
<label style="visibility: hidden; display: none;" for="token-text">{ts}Text message tokens{/ts}</label>
<input id="token-text" class="crm-token-selector big" data-field="text_message" />
{help id="id-token-text" tplFile=$tplFile file="CRM/Contact/Form/Task/Email.hlp"}
</div>
<div class='text'>
<span class="sr-only">{$form.text_message.label}</span>
{$form.text_message.html}<br />
</div>
</div>
Expand Down