Skip to content
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

FOCUSED: Fix low-contrast of line and dot in number-line component #1281

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Myranae
Copy link
Contributor

@Myranae Myranae commented May 16, 2024

Summary:

This fixes an issue where the line and point in the number-line widget were not meeting the WCAG standards for color contrast. The contrast should be at least 3:1, which is implemented here using WB color tokens.

Before fix:
image
image
image

After fix:
image
image
image

Issue: LEMS-252

Test plan:

  • Run yarn storybook
  • Open any of the number-line stories
  • Confirm the contrast between the white background and the dot and line is above 3:1
  • Confirm all checks pass

@Myranae Myranae self-assigned this May 16, 2024
Copy link
Contributor

github-actions bot commented May 16, 2024

Size Change: +2.31 kB (+0.28%)

Total Size: 842 kB

Filename Size Change
packages/perseus-editor/dist/es/index.js 270 kB +973 B (+0.36%)
packages/perseus/dist/es/index.js 405 kB +1.31 kB (+0.33%)
packages/simple-markdown/dist/es/index.js 12.4 kB +28 B (+0.23%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.2 kB
packages/kmath/dist/es/index.js 4.26 kB
packages/math-input/dist/es/index.js 80.1 kB
packages/math-input/dist/es/strings.js 1.73 kB
packages/perseus-core/dist/es/index.js 906 B
packages/perseus-error/dist/es/index.js 866 B
packages/perseus-linter/dist/es/index.js 21.8 kB
packages/perseus/dist/es/strings.js 3.21 kB
packages/pure-markdown/dist/es/index.js 3.67 kB

compressed-size-action

Copy link

codecov bot commented May 16, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 71.51%. Comparing base (a0dfc66) to head (27315c7).
Report is 49 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1281      +/-   ##
==========================================
+ Coverage   69.18%   71.51%   +2.32%     
==========================================
  Files         476      486      +10     
  Lines      101772   102648     +876     
  Branches     7226    11751    +4525     
==========================================
+ Hits        70415    73404    +2989     
+ Misses      31178    29244    -1934     
+ Partials      179        0     -179     

Impacted file tree graph

Files Coverage Δ
packages/perseus/src/widgets/number-line.tsx 58.48% <58.33%> (+0.46%) ⬆️

... and 165 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0dfc66...27315c7. Read the comment docs.

@@ -472,25 +472,25 @@ class NumberLine extends React.Component<Props, State> {
// it can't be interacted with.
let fill;
if (isOpen) {
fill = KhanColors._BACKGROUND;
fill = "transparent";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed based on a comment in the file defining KhanColors that said it should be made transparent instead of using _BACKGROUND

@Myranae Myranae changed the title Fix low-contrast of line and dot in number-line component FOCUSED: Fix low-contrast of line and dot in number-line component Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant