背景
#256 (B 案 PR 1) の final code review で発覚(pre-existing 課題)。
src/components/ui/ClearButton.tsx / src/components/ui/CopyButton.tsx の <button> に type="button" 属性が無い。
課題
これらのボタンが <form> 要素内で使用された場合、HTML 仕様で type 属性なしの <button> はデフォルト type="submit" として扱われ、クリックで意図せず form submit を発動させる可能性がある。
ActionButton.tsx は明示的に type="button" を持っており(line 40)、整合性も確保されない。
対応
両ファイルの <button> 要素に type="button" を追加。
// ClearButton.tsx
<button type="button" onClick={onClick} className="...">
// CopyButton.tsx (compact 分岐 + 通常分岐の両方)
<button type="button" onClick={handleClick} aria-label={label} className="...">
関連
背景
#256(B 案 PR 1) の final code review で発覚(pre-existing 課題)。src/components/ui/ClearButton.tsx/src/components/ui/CopyButton.tsxの<button>にtype="button"属性が無い。課題
これらのボタンが
<form>要素内で使用された場合、HTML 仕様でtype属性なしの<button>はデフォルトtype="submit"として扱われ、クリックで意図せず form submit を発動させる可能性がある。ActionButton.tsxは明示的にtype="button"を持っており(line 40)、整合性も確保されない。対応
両ファイルの
<button>要素にtype="button"を追加。関連