Closed stxphcodes closed 5 years ago
Having just seen this for the first time, I am curious if this well needed "Color coding redcap record table" has taken into account any accessibility issues surrounding those with color blindness that might not allow for the user to distinguish such variations in color?
For your consideration, rather than merely setting style="background-color:<color>"
(or its updated class="btn btnsmall btn-<success_status>"
), you may want to also consider including an additional icon, or (likely for most accessibility) at least providing alternate wording such as Update
rather than Edit
where applicable.
I might further recommend that you .format()
these all together into a single string_to_return
variable with each if, rather than doing the format at each return, in order to improve maintainability. And, along the lines of maintainability, I also note that this same set of code seems to appear in a couple different places in ehb_datasources/drivers/redcap/driver.py
that could be consolidated and possibly even incorporate more self-documenting variable names than i
, j
, and l
, for example. But I digress, and will aim to save such code-directed details for the actual code review. Just wanted to emphasize the very "accessible" possibilities of including further accessibility into the representation.
@r3m0chop Great suggestions - thank you! I will try to address some of them before the code review so we don't have to go over it twice. As for color blindness, interesting and definitely applicable point. I will look into different alternatives/additions to the edit buttons.
@szh2425 We can make the color blindness a new issue and implement in another phase. @r3m0chop, great suggestion thank you!
Add completion field to redcap forms and display and cache completion status on record table.