feat(enketo): add background color appearances for form questions#10845
feat(enketo): add background color appearances for form questions#10845megha1807 wants to merge 7 commits intomedic:masterfrom
Conversation
jkuester
left a comment
There was a problem hiding this comment.
Nice! I confirmed the background colors are applied as expected. However, I think we are going to have to have some extra styling at least to change the text color to white. Here is how things look now with some different form widgets:
I am not sure about the text boxes, etc. 🤔 We could probably leave them white, but it might look better to have them be a shaded version of the same color... My main concern with that is that the different question types might need different styling. We could try to test most of them and see. 🤷
@delcroip do you have any thoughts here?
|
Thanks for the review and screenshots, @jkuester! Good catch on the contrast. Add color: white (or a dark shade for lighter colors like yellow/lime) to the .or-appearance-background-* classes I'll test across note fields, text inputs, selects, and radio/checkbox groups before pushing. Does that approach sound reasonable, or would you prefer I wait for @delcroip's input first? |
|
That proposal sounds good. I think white text should be fine. Here is the form I was using to test with: appearances.xlsx We should be good to keep iterating on this and @delcroip can weigh in when/if he gets the chance. 👍 |
|
Thanks, @jkuester! Will get started on the fixes and push an update soon. |
…ckground-color-appearances
…://github.com/megha1807/cht-core into feat/9893-enketo-background-color-appearances
|
@jkuester Fixed the contrast ratios for green (#75b2b2 → #2e7d7d) and blue (#6b9acd → #2c5f9e) background colors to meet WCAG accessibility requirements. Ready for re-review! |
|
@jkuester The contrast ratios for green and blue have been fixed. The remaining CI failures appear to be pre-existing flaky integration tests unrelated to this CSS change. Ready for re-review! |
Summary
Adds new general-purpose background color appearance classes for Enketo form questions.
Changes
medic.lessunder.enketo:.or-appearance-background-red.or-appearance-background-green.or-appearance-background-blue.or-appearance-background-yellow.or-appearance-background-limeHow to use
In the XLS form config, set the appearance column to any of:
background-red,background-green,background-blue,background-yellow,background-limeNotes
.or-appearance-red/blue/...classes are retained for backwards compatibilityCloses #9893