Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Read a label whose for names no element as its field wrapper's positional label

オープン 初心者向け
#3,369 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

FormControlLabel::fieldWrapperLabel()から始め、for属性を持つラベルをどのように処理し、その値を所有元のドキュメント内で解決するかを調べてください。参照先のないfor、別の要素に解決されるもの、2つのコントロールを持つwrapperのunit fixtureを追加または更新してください。参照先のないラベルがinputに関連付けられ、他の2つのケースは未割り当てのままで、composer test:canonicalが成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Problem

A <label for="X"> whose for names no element in the document is left unassociated, even when it is the only label beside the only control in its field wrapper:

<div class="field"><label for="Name">Name *</label><input type="text" name="name" id="name"></div>

(for matching is case-sensitive, so Name ≠ name.) FormControlLabel::fieldWrapperLabel() already reads the positional association "one label, one control, same wrapper", but only for labels with no for attribute. A dangling for states no association either, so it should be read the same way. Today the caption drops to description copy: static-site-importer emits it as Jetpack help text rendered below the input in a different size and colour, and the field's label becomes the input name. Seen on every One.com contact form (hr-nordic.com).

Proposal

In fieldWrapperLabel(), treat a label whose for resolves to no element in the owner document like a label without for. A for that resolves to some other element still opts out.

Acceptance

  • A unit fixture with the markup above associates Name * with the input.
  • A label whose for names a different existing element is still not claimed positionally.
  • A wrapper shared by two controls still yields no positional label.
  • composer test:canonical passes.

AI disclosure: drafted by Franklin (Claude, via the Pi coding agent) from a reduced fixture of the hr-nordic.com import; Chris Huber directs the work.

主要言語
PHP
スター
22
フォーク
2
平均マージ
7時間 48分
マージ済み PR(30日)
688

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/blocks-engine のほかの issue

Automattic/blocks-engine の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。