Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Make the welcome bubble a real button

已關閉
#336 3 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@kachamsiddarth 已經在處理了。

開始於 2026年10月26日。

  • #383 來自 @kachamsiddarth —— 已合併

評估

這個 Issue 還沒有評估資料。

描述

accessibility enhancement good first issue hacktoberfest widget

The welcome bubble ("Need help? Chat with us!") opens the chat when clicked, but it's a div with a click listener. Keyboard and screen reader users can't reach it or tell it does anything. Only its small close button is a real button.

What to do

  • Render the bubble's text as a <button type="button"> that opens the chat. Keep the close button as a separate button next to it, not inside it (a button inside a button is invalid HTML).
  • Keep the look the same. The wrapper can stay a div for positioning.
  • Keep the existing behavior: clicking the text opens the chat, the close button only hides the bubble.

Where to look

  • packages/widget/src/dom/bubble.ts (WelcomeBubble constructor)
  • .cc-bubble and .cc-bubble-close in packages/widget/src/styles/widget.css
  • packages/widget/tests/widget.test.ts and packages/widget/tests/loader.test.ts (search for cc-bubble)

Acceptance criteria

  • The bubble text is a <button> reachable with Tab, and Enter or Space opens the chat
  • The close button is a sibling, not a child, of that button
  • No visual change (a before and after screenshot in the PR)
  • Tests for keyboard activation and for dismiss
  • Changeset for @chatcops/widget (patch)
  • pnpm test:coverage, pnpm lint and pnpm size pass

The chat panel (dist/chatcops.panel.js) has a 14 kB gzip budget and about 800 B of it is left, shared by several open issues. Keep the change small, and check pnpm size before you open the PR.

主要語言
TypeScript
星號
13
分支
7
平均合併
3 小時 28 分鐘
30 天內合併 PR
296

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codercops/chatcops 的其他 Issue

查看 codercops/chatcops 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。