fix(a11y): control label text color #120
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist:
Update index.md
)The
ControlLabel
component doesn't have text color set, so it has been using the default color (black), which makes the text unreadable in dark theme:The issue can be seen here: https://opensource.freecodecamp.org/ui/?path=/story/components-formgroup--default&globals=backgrounds.value:!hex(0a0a23).
This PR adds a default text color to the component.
The root cause is actually a little deeper.
body
stylebody
hascolor
set tosecondary-color
ui/src/global-element-styles.css
Lines 383 to 388 in 5317d85
We are removing
global-element-styles.css
as part of #61 so I don't bother updating the file.Also, the issue luckily doesn't affect /learn. The element does need to fall back to the
body
text color, which is alsosecondary-color
, but this token exists there: https://github.com/freeCodeCamp/freeCodeCamp/blob/50d7f03763e7d64690391bc7a004eccbdd75156d/client/src/components/layouts/variables.css#L43.Screenshot