nci / scores

Metrics for the verification, evaluation and optimisation of forecasts, predictions or models.
https://scores.readthedocs.io/
Apache License 2.0
58 stars 15 forks source link

Changed table styling in readthedocs - accessibility #459

Open Steph-Chong opened 4 months ago

Steph-Chong commented 4 months ago

Recently (about a week ago), tables started rendering differently in readthedocs. The changes can present difficulties for people with colour blindness.

@tennlee and I spent a bit of time trying to figure out what had caused the change, and how we could modify or revert the change. But we were unsuccessful.

Changes to how tables render include:

When you mouse over hyperlinked text (so it becomes orange text on a purple background), Tennessee who is partially colour blind cannot see the text anymore. We figure if this is the case for Tennessee, it will be for other people too.

By any chance, does anyone know how this can be fixed?

nikeethr commented 4 months ago

https://pydata-sphinx-theme.readthedocs.io/en/stable/examples/kitchen-sink/tables.html

see v0.14 v.s. v0.15

Options:

First two are temporary solutions, I don't think there's an "alternate" off-the-shelf alternative within sphinx-book-theme itself. Third is quite a big visual change I imagine...

Steph-Chong commented 4 months ago

Thanks very much for that information @nikeethr - much appreciated.

About 5 days ago, I spent some time trawling through documentation and change logs trying to figure out the cause and didn't manage to find that. (But I also only learned how to use a command line at the start of May, so I am very, very, very new at this!)

I checked the repositories for multiple parts of the software stack that helps put together readthedocs for scores, and didn't find any open issues on the topic. But maybe I looked at the wrong repos, or perhaps not enough time had passed for anyone to raise it. I guess it wouldn't hurt to look again, then raise an issue if nobody else has already done so.

Steph-Chong commented 4 months ago

In case it is helpful to anyone, here is how the tables used to render

image

nikeethr commented 4 months ago

Note: adding pydata-sphinx-theme==0.14.4 in https://github.com/nci/scores/blob/develop/docs/requirements.txt

fixes this. Alternatively changing the theme also works, but the notebooks are displayed better with the sphinx-book-theme.

nikeethr commented 4 months ago

side note: This is universally affected other major docs as well. E.g.: https://docs.xarray.dev/en/latest/api.html, and so far numpy/xarray and others have not reverted the behaviour yet.