-
Notifications
You must be signed in to change notification settings - Fork 0
fix: improve contrast for accessibility #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ | |
| } | ||
|
|
||
| .flashcards-title { | ||
| color: var(--primary-500, #00262B); | ||
| color: #111827; | ||
| font-size: 24px; | ||
| font-weight: 700; | ||
| line-height: 32px; | ||
|
|
@@ -51,7 +51,7 @@ | |
| } | ||
|
|
||
| .flashcards-start-title { | ||
| color: var(--primary-500, #00262B); | ||
| color: #111827; | ||
| text-align: center; | ||
| font-family: Inter; | ||
| font-size: 20px; | ||
|
|
@@ -66,8 +66,8 @@ | |
| justify-content: center; | ||
| gap: 8px; | ||
| align-items: center; | ||
| background: var(--primary-500, #00262B); | ||
| color: var(--white, #FFFFFF); | ||
| background: #1D4ED8; | ||
| color: #fff; | ||
| font-size: 18px; | ||
| font-weight: 500; | ||
| border: none; | ||
|
|
@@ -76,7 +76,7 @@ | |
| } | ||
|
|
||
| .flashcards-start-button:hover:not(:disabled) { | ||
| background: var(--primary-600, #001A1D); | ||
| background: #2563EB; | ||
| } | ||
|
|
||
| .flashcards-start-button:disabled { | ||
|
|
@@ -128,8 +128,8 @@ | |
| display: flex; | ||
| flex-direction: column; | ||
| border-radius: 8px; | ||
| border: 2px solid var(--Light-300, #F2F0EF); | ||
| background: #fff; | ||
| border: 2px solid #374151; | ||
| background: #F9FAFB; | ||
| transition: opacity 0.3s ease-in-out; | ||
| overflow: hidden; | ||
| cursor: pointer; | ||
|
|
@@ -158,7 +158,7 @@ | |
| } | ||
|
|
||
| .flashcard-text { | ||
| color: var(--primary-500, #00262B); | ||
| color: #111827; | ||
| font-size: 18px; | ||
| font-weight: 400; | ||
| line-height: 28px; | ||
|
|
@@ -203,14 +203,14 @@ | |
| align-items: center; | ||
| border: none; | ||
| border-radius: 50%; | ||
| background: var(--light-300, #F2F0EF); | ||
| background: #F9FAFB; | ||
| cursor: pointer; | ||
| transition: all 0.2s ease-in-out; | ||
| } | ||
|
|
||
| .flashcard-left-button:hover:not(:disabled), | ||
| .flashcard-right-button:hover:not(:disabled) { | ||
| background: var(--light-400, #E1DDDB); | ||
| background: #1D4ED8; | ||
| transform: scale(1.03); | ||
| } | ||
|
Comment on lines
211
to
215
|
||
|
|
||
|
|
@@ -240,7 +240,7 @@ | |
| } | ||
|
|
||
| .flashcard-navigation-text { | ||
| color: var(--primary-500, #00262B); | ||
| color: #111827; | ||
| text-align: center; | ||
| font-size: 20px; | ||
| font-weight: 500; | ||
|
|
@@ -269,15 +269,15 @@ | |
| } | ||
|
|
||
| .flashcard-help-icon svg { | ||
| color: var(--primary-500, #00262B); | ||
| color: #1D4ED8; | ||
| } | ||
|
Comment on lines
271
to
273
|
||
|
|
||
| .help-popover { | ||
| position: absolute; | ||
| bottom: calc(100% + 12px); | ||
| right: 0; | ||
| border-radius: 4px; | ||
| background: var(--Core-Elm, #00262B); | ||
| background: #1D4ED8; | ||
| color: #fff; | ||
| padding: 4px 8px; | ||
| min-width: 200px; | ||
|
|
@@ -295,7 +295,7 @@ | |
| } | ||
|
|
||
| .help-popover-content { | ||
| color: var(--extras-white, #FFF); | ||
| color: #fff; | ||
| text-align: center; | ||
| font-size: 14px; | ||
| font-style: normal; | ||
|
|
@@ -311,5 +311,6 @@ | |
| height: 0; | ||
| border-left: 8px solid transparent; | ||
| border-right: 8px solid transparent; | ||
| border-top: 8px solid var(--primary-500, #00262B); | ||
| } | ||
| border-top: 8px solid #1D4ED8; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -35,7 +35,7 @@ | |||||
| } | ||||||
|
|
||||||
| .matching-start-title { | ||||||
| color: var(--primary-500, #00262B); | ||||||
| color: #111827; | ||||||
|
||||||
| color: #111827; | |
| color: var(--primary-500, #111827); |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.matching-box is styled as an interactive control (cursor + hover states), but in games/static/html/matching.html it is a clickable <div> (not keyboard focusable by default). For accessibility, consider switching it to a <button> or adding tabindex="0" + appropriate ARIA/keyboard handlers, and add a visible :focus-visible style to match the hover/selected states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rules replace themeable
var(--primary-500, ...)color tokens with hard-coded hex values. Since the rest of the file still relies on CSS variables with fallbacks (e.g.,var(--white, ...),var(--light-200, ...)), this makes it harder for the host platform/theme to override colors. Consider keepingvar(...)usage (or defining a local custom property) and only changing the fallback to the higher-contrast value.