Skip to content

Commit

Permalink
[4.0] Installation Remove [a11y] (#33448)
Browse files Browse the repository at this point in the history
This pr moves the paragraph description from outside the table to place it correctly as a caption inside the table.
It adds scope=col to the table headers and scope=row to the label
  • Loading branch information
brianteeman authored May 2, 2021
1 parent 3258123 commit 7b98bbb
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions installation/tmpl/remove/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,37 +135,39 @@ class="j-install-step-form flex-column mt-5 border rounded d-none"
<?php endforeach; ?>
<?php
if ($displayTable) : ?>
<p class="install-text"><?php echo Text::_('INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC'); ?></p>
<table class="table table-sm">
<caption>
<?php echo Text::_('INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC'); ?>
</caption>
<thead>
<tr>
<th>
<?php echo Text::_('INSTL_PRECHECK_DIRECTIVE'); ?>
</th>
<th>
<?php echo Text::_('INSTL_PRECHECK_RECOMMENDED'); ?>
</th>
<th>
<?php echo Text::_('INSTL_PRECHECK_ACTUAL'); ?>
</th>
</tr>
<tr>
<th scope="col">
<?php echo Text::_('INSTL_PRECHECK_DIRECTIVE'); ?>
</th>
<th scope="col">
<?php echo Text::_('INSTL_PRECHECK_RECOMMENDED'); ?>
</th>
<th scope="col">
<?php echo Text::_('INSTL_PRECHECK_ACTUAL'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->phpsettings as $setting) : ?>
<?php if ($setting->state !== $setting->recommended) : ?>
<tr>
<td>
<th scope="row">
<?php echo $setting->label; ?>
</td>
</th>
<td>
<span class="badge bg-success disabled">
<?php echo Text::_($setting->recommended ? 'JON' : 'JOFF'); ?>
</span>
<span class="badge bg-success disabled">
<?php echo Text::_($setting->recommended ? 'JON' : 'JOFF'); ?>
</span>
</td>
<td>
<span class="badge bg-<?php echo ($setting->state === $setting->recommended) ? 'success' : 'warning'; ?>">
<?php echo Text::_($setting->state ? 'JON' : 'JOFF'); ?>
</span>
<span class="badge bg-<?php echo ($setting->state === $setting->recommended) ? 'success' : 'warning'; ?>">
<?php echo Text::_($setting->state ? 'JON' : 'JOFF'); ?>
</span>
</td>
</tr>
<?php endif; ?>
Expand Down

0 comments on commit 7b98bbb

Please sign in to comment.