Fix sponsor directory contrast and card treatment in dark mode

オープン
#422 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

公開されている /sponsors エントリーポイントから始め、_docs/design/design-system.md と core/tests/test_sponsor_directory.py を併せて読みます。既存の featured-card とロゴの挙動を調査し、その後、受け入れ基準に照らして両方のテーマ、レスポンシブ幅、フォーカス状態、ロゴがない場合の処理を確認します。指定された sponsor directory テストと、必要なアクセシビリティおよびブラウザチェックを実行します。保存済みのスポンサー data やロゴファイルを変更せずにカードの可読性が維持されれば完了です。

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

説明

frontend P1

Outcome

The public /sponsors directory must remain legible in dark mode while preserving sponsor logos in the form supplied by their owners. The current featured cards force a white card but render body copy with theme-muted colors, producing low contrast.

Normative references:

Product decision

Separate the logo presentation from the card body. A neutral/light logo plate may preserve authored logo colors in either theme; the sponsor name, description, and action use theme-native card/body tokens. Do not recolor logos to compensate for the card contrast bug.

Scope

  • Recompose featured sponsor cards on /sponsors so logo plate and content surface have explicit, compatible light/dark treatments.
  • Define theme-appropriate text, link, border, shadow, past-supporter chip, focus, hover, and active states.
  • Preserve graceful handling when a logo asset is absent or cannot resolve.
  • Regression-check homepage and events sponsor placements if any shared sponsor or card primitive changes.

Non-goals

  • Changing sponsor records, order, placement, descriptions, destinations, or lifecycle.
  • Editing, filtering, inverting, regenerating, or replacing logo image files.
  • Redesigning the homepage, events hub, Studio sponsor editor, or sponsor ingestion.
  • Introducing hardcoded sponsor content or a file/runtime fallback.

Dependencies

  • No external dependency. Database-owned Sponsor and placement queries remain authoritative.
  • Prefer page-local styles. If a shared primitive is changed, its full consumer set becomes required regression scope.

Acceptance criteria

  • Featured card body text and links meet WCAG AA contrast in light and dark themes (4.5:1 for normal text, 3:1 for large text); meaningful boundaries and focus indicators meet 3:1 against adjacent colors.
  • Each logo is shown unmodified with object-fit: contain inside a bounded, visually distinct plate that remains legible in both themes; transparent, wide, tall, and missing logos do not collapse or stretch the card.
  • Card body surfaces use design-system theme tokens and never pair a forced white background with dark-theme muted text.
  • Sponsor links retain their stored destinations and target, rel="sponsored noopener noreferrer", accessible sponsor-name label, and visible keyboard focus.
  • Past-supporter chips have readable foreground/background/border contrast in both themes and wrap without clipping.
  • Card, link, and chip hover/focus/active states do not rely on color alone and respect reduced-motion preferences.
  • The existing database query/order, missing-logo degradation, page metadata, and database-only-content tests remain unchanged/passing.
  • At 1440, 768, 390, and 320 CSS px, long names/descriptions, all logo aspect ratios, and past-supporter chips have no overlap or document-level horizontal overflow. Interactive targets are at least 44 CSS px where the design presents a button-like action.
  • If shared sponsor/card CSS or markup changes, homepage and /events keep their accepted light/dark layout and links.

Verification scenarios

Repository
  1. Run sponsor directory/query, sponsor model/import, design-system shell, shared primitive, and accessibility tests.
  2. Render fixtures for transparent wide/tall logos, missing/stale logo keys, long copy, and no past supporters; assert one bad logo never takes down the page.
  3. Run the project contrast/accessibility checker against both themes and record measured pairs.
Browser
  1. Compare /sponsors in light and dark mode at 1440/768/390/320. Inspect the logo plate separately from the card body.
  2. Tab through every sponsor action and confirm focus remains visible without content shifting.
  3. Toggle reduced motion and exercise hover/focus states.
  4. If a shared primitive changed, open the homepage sponsor band and /events in both themes and verify content/order/destinations and responsive layout.
  5. Confirm document.documentElement.scrollWidth === document.documentElement.clientWidth at every width.

Evidence to attach

  • Before/after full-page screenshots using .tmp/screenshots/sponsors-current/ as baseline, desktop and mobile in both themes.
  • Contrast measurements and focused test results.
主要言語
Python
スター
0
フォーク
0
平均マージ
37分
マージ済み PR(30日)
36

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

DataTalksClub/website のほかの issue

DataTalksClub/website の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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