Empty table header

Created on 5 September 2024, 5 months ago

Problem/Motivation

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 &amp; drop"
              data-once="drupal-ajax"
            />
          </div>
        </div>
      </div>
    </th>
    <th></th>
    <th class="tabledrag-hide" style="display: none">Order</th>
  </tr>
</thead>

WAVE Screenshot:

Steps to reproduce

Create an entity reference for paragraphs, when in the editor view review the code for the table header or leverage the WAVE tool.

Proposed resolution

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.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jldust

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024