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 empty label accessibility issue on report elements #30694

Merged
merged 3 commits into from
Oct 15, 2024
Merged
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
8 changes: 4 additions & 4 deletions CRM/Report/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ public function addFilters() {
default:
// default type is string
$this->addElement('select', "{$fieldName}_op", ts('Operator:'), $operations,
['onchange' => "return showHideMaxMinVal( '$fieldName', this.value );"]
['onchange' => "return showHideMaxMinVal( '$fieldName', this.value );", 'title' => ts('%1 Filter Operator', [1 => $field['title']])]
);
// we need text box for value input
$this->add('text', "{$fieldName}_value", NULL, ['class' => 'huge']);
Expand Down Expand Up @@ -1692,8 +1692,8 @@ public function addOrderBys() {
'ASC' => ts('Ascending'),
'DESC' => ts('Descending'),
]);
$this->addElement('checkbox', "order_bys[{$i}][section]", ts('Order by Section'), FALSE, ['id' => "order_by_section_$i"]);
$this->addElement('checkbox', "order_bys[{$i}][pageBreak]", ts('Page Break'), FALSE, ['id' => "order_by_pagebreak_$i"]);
$this->addElement('checkbox', "order_bys[{$i}][section]", ts('Order by Section'), FALSE, ['id' => "order_by_section_$i", 'title' => ts('Order by Section %1', [1 => $i])]);
$this->addElement('checkbox', "order_bys[{$i}][pageBreak]", ts('Page Break'), FALSE, ['id' => "order_by_pagebreak_$i", 'title' => ts('Page Break %1', [1 => $i])]);
}
}
}
Expand All @@ -1720,7 +1720,7 @@ public function buildInstanceAndButtons() {
$this->addElement('select', 'groups', ts('Group'),
['' => ts('Add Contacts to Group')] +
CRM_Core_PseudoConstant::nestedGroup(),
['class' => 'crm-select2 crm-action-menu fa-plus huge']
['class' => 'crm-select2 crm-action-menu fa-plus huge', 'title' => ts('Add Contacts to Group')]
);
$this->assign('group', TRUE);
}
Expand Down
1 change: 1 addition & 0 deletions CRM/Report/Form/Instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public static function buildForm(&$form) {
'size' => 5,
'style' => 'width:240px',
'class' => 'advmultiselect',
'title' => ts('ACL Group/Role'),
]
);
$grouprole->setButtonAttributes('add', ['value' => ts('Add >>')]);
Expand Down
7 changes: 6 additions & 1 deletion templates/CRM/Report/Form/Tabs/Filters.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
<td class="label report-contents">{if !empty($field.title)}{$field.title}{/if}</td>
<td class="report-contents">{$form.$fieldOp.html}</td>
<td>
<span id="{$filterVal}_cell">{$form.$filterVal.label}&nbsp;{$form.$filterVal.html}</span>
<span id="{$filterVal}_cell">
<label class="sr-only" for="{$form.$filterVal.id}">
{if !empty($field.title)}{$field.title}{else}{$field.name}{/if} filter value
</label>
{$form.$filterVal.label}&nbsp;{$form.$filterVal.html}
</span>
<span id="{$filterMin}_max_cell">
{if array_key_exists($filterMin, $form) && $form.$filterMin}{$form.$filterMin.label}&nbsp;{$form.$filterMin.html}&nbsp;&nbsp;{/if}
{if array_key_exists($filterMax, $form) && $form.$filterMax}{$form.$filterMax.label}&nbsp;{$form.$filterMax.html}{/if}
Expand Down