Rounding makes the pass/fail appear incorrect
Nobody has claimed this yet.
- Dominant language
- Svelte
- Stars
- 34
- Forks
- 1
- Avg merge
- 3h 35m
- Merged PRs (30d)
- 8
Description
Example- https://www.oddcontrast.com/#hsl__hsl(196.31_8.1868~_39.763~)__hsl(299_44~_91.5~)
It has a ratio of 4.498..., which rounds to 4.5. 4.5 is displayed, but the pass/fail is determined based on the full number.
Some options-
- Pass/fail based on the rounded number instead of the full number, which gives less precision (but are they actually significant digits? Probably not)
- Display a "floor" instead of a rounded number, in which case the example would show 4.49. This maintains that the ratio is not actually passing, but the value is more incorrect.
- Catch cases where this happens, and show the ratio to more digits, and not round. Always correct, always in sync, but adds more variation to the ratio length.
I guess the question is - do we care more about the pass fail or the ratio being accurate? Or make it a bit more complex and go with option #3?
We may also want to always show 2 digits after the decimal. This doesn't solve this issue, but would make the design more stable.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example at oddcontrast.com using the HSL values in the issue and compare the displayed ratio with the pass/fail result. Review the three proposed rounding approaches and the request for stable decimal formatting; done means the displayed ratio and pass/fail status no longer appear contradictory.
Written by the indexing model from the issue text.
Assessment
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100