You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accessibility issues in documentation website #34366
It seems that the most often recurrent problem is text with low contrast, right? We could probably find a way to adjust the CSS to ensure that the colors of the text and/or background are always contrasted enough. Some of the text colors come from code syntax highlighting. So we would have to find out if it's possible to change the syntax highlighting theme used by sphinx. Alternatively we could use a lighter background for code areas.
The empty th appears in the HTML tables displayed when rendering pandas dataframes in examples. It's only the case for the first column with the positional indices. The other columns have non-empty th cells with the column names, so I don't think it's a very severe problem.
Could you clarify if you mean "severe" as easy to solve or as an issue that is not critical? @ogrisel
Easy to solve?: trying pandas commands to change the table headers, give good results on Jupyter but not on Sphinx. I keep getting the same error (I tried reseting the index, or giving it a name). I think hiding the index may remove the error, but the index may be needed for the example. Most importantly, the command to hide the index will probably be confusing for the user. Yes, it's a pandas' issue.
If you mean it's not severe for the user: Apparently the user can loose their position on the table, (they won't know they the are). There is a lot of material written about this issue, so I believe that it is an important issue to solve at some point, since we have tables in many places on the web.
Please note that the warnings are related to the actions that are only accessible with a mouse, and we have a lot of those. Again, there are a lot of things to study regarding this issue.
changed the title [-]DOC - documentation website seems to have accessibility issues.[/-][+]DOC - documentation website has accessibility issues.[/+]on Jun 27, 2026
changed the title [-]DOC - documentation website has accessibility issues.[/-][+]Accessibility- documentation website has accessibility issues.[/+]on Jun 27, 2026
changed the title [-]Accessibility- documentation website has accessibility issues.[/-][+]Accessibility issues in documentation website[/+]on Jun 27, 2026
Basically, my thinking is that as much as possible accessibility should be improved at the theme level, for example contrast issues. There may definitely be some places where the scikit-learn repo is the right place to improve the situation, but the theme level is the right place to start IMO, because it will improve accessibility for all the projects using the pydata-sphinx-theme, not only our website.
Footnotes
full disclosure I don't really know what "working" means in terms of accessibility ... ↩
Activity
ogrisel commentedon Jun 23, 2026
It seems that the most often recurrent problem is text with low contrast, right? We could probably find a way to adjust the CSS to ensure that the colors of the text and/or background are always contrasted enough. Some of the text colors come from code syntax highlighting. So we would have to find out if it's possible to change the syntax highlighting theme used by sphinx. Alternatively we could use a lighter background for code areas.
The empty
thappears in the HTML tables displayed when rendering pandas dataframes in examples. It's only the case for the first column with the positional indices. The other columns have non-emptythcells with the column names, so I don't think it's a very severe problem.DeaMariaLeon commentedon Jun 23, 2026
I agree but I think we need to fix the alerts as well.
DeaMariaLeon commentedon Jun 26, 2026
Could you clarify if you mean "severe" as easy to solve or as an issue that is not critical? @ogrisel
Easy to solve?: trying pandas commands to change the table headers, give good results on Jupyter but not on Sphinx. I keep getting the same error (I tried reseting the index, or giving it a name). I think hiding the index may remove the error, but the index may be needed for the example. Most importantly, the command to hide the index will probably be confusing for the user. Yes, it's a pandas' issue.
If you mean it's not severe for the user: Apparently the user can loose their position on the table, (they won't know they the are). There is a lot of material written about this issue, so I believe that it is an important issue to solve at some point, since we have tables in many places on the web.
Please note that the warnings are related to the actions that are only accessible with a mouse, and we have a lot of those. Again, there are a lot of things to study regarding this issue.
StefanieSenger commentedon Jun 27, 2026
I think according to the EU Web Accessibility Directive there is a legal requirement for websites to be (fully) accessible.
Edit: found what I meant:
[-]DOC - documentation website seems to have accessibility issues.[/-][+]DOC - documentation website has accessibility issues.[/+][-]DOC - documentation website has accessibility issues.[/-][+]Accessibility- documentation website has accessibility issues.[/+][-]Accessibility- documentation website has accessibility issues.[/-][+]Accessibility issues in documentation website[/+]lesteve commentedon Aug 3, 2026
You have probably done it already, but I would start with looking at the pydata-sphinx-theme accessibility doc.
My understanding is that in principle some things should "just work" by default 1 but there are also some tweaks we can do in our
conf.py. If for some reason you think that accessibility not good enough, I would recommend that you open issues in https://github.com/Quansight-Labs/accessible-pygments or https://github.com/pydata/pydata-sphinx-theme to improve the situation.Basically, my thinking is that as much as possible accessibility should be improved at the theme level, for example contrast issues. There may definitely be some places where the
scikit-learnrepo is the right place to improve the situation, but the theme level is the right place to start IMO, because it will improve accessibility for all the projects using the pydata-sphinx-theme, not only our website.Footnotes
full disclosure I don't really know what "working" means in terms of accessibility ... ↩
DeaMariaLeon commentedon Aug 4, 2026
There are several issues that have nothing to do with the
pydata-sphinx-theme, because we add styling on top of it.I know, but thanks.
I agree, but most things don't really come from there I believe.
lorentzenchr commentedon Sep 25, 2026
Can we reconsider the light style syntax highlighting? See #34376 (comment).
DeaMariaLeon commentedon Oct 28, 2026
Code highlight and rich HTML estimators displays have been improved.
Closing this issue as the rest of the work is not planned.