Drupal 8では、テーブルのレンダリングは依然としてDrupal 7によく似ています。PHPで行と列の多次元配列を構築し、Drupalがそれぞれa <tr>と<td>sに変換するようにします。この混乱するDrupalismはまだあります。これ'data'により、レンダー配列要素をセルデータとして追加できます(データ属性と混同しないでください)。
開発者が「データ」を使用してセルのコンテンツをレンダリングすることを選択したサイトを与えられましたが<td>、データの周囲にクラスを追加する方法がわかりません。
Table.phpのソースコードとドキュメントを読みましたが、新しいことは知っていますが、#wrapper_attributes  これを解読することはできません。
私はクラスを追加するために少なくとも4つの方法を試しましたが、どれも機能しません。
$table['row-' . $row_id] = [
  // Option 1: Class appears on <tr> tag
  '#attributes' => [
    'class' => ['option-1-row-attributes'],
    'id' => 'row-' . $row_id,
    'no_striping' => TRUE,
  ],
  // Option 2: Class appears on <td> tag of first column. 
  'item' => [
    '#markup' => $row['my_item']->label(),
    '#wrapper_attributes' => [   
      'class' => ['option-2-markup-wrapper-attributes'],
    ],
  ],
  // In the following section, the only item that works is
  // the class on the <a> tag.
  'edit_operation' => [
    'data' => [
      '#type' => 'link',
      '#url' => Url::fromRoute('my_module.my_route', ['item' => $row_id]),
      '#title' => $this->t('Edit'),
      '#attributes' => [
        // Option 3: Class appears on the anchor tag
        'class' => ['use-ajax', 'option-3-link-attributes'],
        'data-dialog-type' => 'modal',
        'data-dialog-options' => Json::encode([
          'width' => 700,
        ]),
      ],
      // Option 4: Has no effect.
      '#wrapper_attributes' => [
        'class' => ['option-4-data-wrapper-attributes'],
      ],
    ],
    // Option 5: Update: This appears to be the correct solution! 
    // Class appears on the <td>.
    '#wrapper_attributes' => [
      'class' => ['option-5-wrapper-attributes'],
    ],
    // Option 6: Has no effect.
    '#attributes' => [
      'class' => ['option-6-attributes'],
    ],
    // Option 7: Has no effect.
    'class' => ['option-7-attributes'],
  ],
];