なぜコピーボタンか
長押し選択は難しく、ボタンならワンタップです(MDN, n.d.-a)。
「コピーしました」表示
即時の反応が重要です(Miller, 1968; Apple, n.d.; Google, n.d.; MDN, n.d.-b)。Android 13以降は重複に注意(Android Developers, n.d.)。トーストや触覚フィードバックも。
セキュリティとアクセシビリティ
機密値は慎重に扱い、状態を読み上げます(WCAG 2.2 4.1.3)。
よくある質問
- トーストは必要?
- アイコン変化で足りる場合も。
- 空白もコピー?
- 貼り付け先に合わせて決めます。
出典確認日:2026-10-27
参考文献
- MDN Web Docs. (n.d.-a). Clipboard API. クリップボードAPIの仕組みです。
- MDN Web Docs. (n.d.-b). Clipboard: writeText() method. writeTextはPromiseを返します。
- Android Developers. (n.d.). Copy and paste. Android 13以降の重複通知回避です。
- Apple. (n.d.). Feedback. Human Interface Guidelines. 控えめで明確なフィードバックです。
- Google. (n.d.). Snackbar. Material Design 3. 短い確認メッセージです。
- Miller, R. B. (1968). Response time in man-computer conversational transactions. In Proceedings of the December 9–11, 1968, Fall Joint Computer Conference, Part I (pp. 267–277). ACM. 即時応答の基準です。
- World Wide Web Consortium. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. 4.1.3ステータスメッセージです。
