- Issue created by @jldust
- Merge request !147Update paragraphs.module to remove empty th in table header β (Open) created by jldust
- Status changed to Needs review
5 months ago 8:58pm 5 September 2024
When using the Paragraph's stable widget allowing for multiple paragraphs to be created, there is an empty <th>
being added to the table.
<thead>
<tr>
<th colspan="2" class="field-label">
<h4 class="label form-required-on-publish">Contacts</h4>
<div class="paragraphs-actions">
<div class="paragraphs-dropdown" data-once="paragraphs-dropdown">
<button class="paragraphs-dropdown-toggle">
<span class="visually-hidden">Toggle Actions</span>
</button>
<div class="paragraphs-dropdown-actions">
<input
class="field-dragdrop-mode-submit paragraphs-dropdown-action button js-form-submit form-submit"
data-drupal-selector="field-contacts-dragdrop-mode"
formnovalidate="formnovalidate"
type="submit"
id="field-contacts-dragdrop-mode"
name="field_contacts_dragdrop_mode"
value="Drag & drop"
data-once="drupal-ajax"
/>
</div>
</div>
</div>
</th>
<th></th>
<th class="tabledrag-hide" style="display: none">Order</th>
</tr>
</thead>
WAVE Screenshot:
Create an entity reference for paragraphs, when in the editor view review the code for the table header or leverage the WAVE tool.
Ideally we would resolve what is causing the empty header in the first place as it seems to be directly related to the 'Show Row Weights' button controls, but as a workaround I've found that hiding the incorrect header row at the end of paragraphs_preprocess_field_multiple_value_form
seems to resolve the issue for now. This is not a long term solution and will need to be resolved.
Needs review
1.0
Code
It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.