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

enhancement: Add body scroll lock and top-right close button to README Badge Modal

未關閉 適合新手
#275 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
82/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
nextjs, react, typescript

研究方向

從 src/features/developer/components/user-profile-client.tsx 開始,追蹤 badgeDialogOpen 如何控制 README Badge 模態框。新增背景捲動鎖定,在對話框關閉或卸載時還原先前的 overflow 狀態,並在右上角新增關閉按鈕,使用指定的翻譯後 aria label。完成條件是:模態框開啟時背景不再捲動,且任一關閉按鈕都能將其關閉。

由索引模型根據 Issue 內容生成。

描述

a11y beginner friendly easy enhancement good first issue ui

In src/features/developer/components/user-profile-client.tsx, clicking 'Get README Badge' opens a modal dialog (badgeDialogOpen). When open, mouse wheel scrolling on the backdrop scrolls the underlying page. In addition, the modal only has a bottom 'Close' button without a standard top-right X close icon.

Motivation

Proper modal UX requires locking background scroll and offering an intuitive top-right dismissal button for accessibility and desktop/mobile usability.

Tasks
  • When badgeDialogOpen is true, set document.body.style.overflow = "hidden" (and restore on close/unmount).
  • Add an X icon button in the top-right corner of the dialog header with aria-label={t("profile.close")}.
  • Ensure clicking the X button closes the dialog.
Files to Check
  • src/features/developer/components/user-profile-client.tsx

[!TIP]
🚀 Want to contribute?
Comment assign me to be automatically assigned to this issue via our GitHub Actions bot. Happy coding! ✨

主要語言
TypeScript
星號
31
分支
25
平均合併
10 小時 4 分鐘
30 天內合併 PR
29

環境準備

從這裡開始

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

O2sa/DevImpact 的其他 Issue

查看 O2sa/DevImpact 的全部 Issue

相似的 Issue

更多 TypeScript Issue

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

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