Skip to content

Bug: accessibility issue with tables in light mode of the theme #39

@lwasser

Description

@lwasser

in the _tables.scss file we have this

@media (prefers-color-scheme: dark) {
  td:not(.row-header):nth-child(1) {
    background-color: var(--pst-color-tbl-row); /* Adjust the dark mode color */
    color: #ffffff; /* Adjust the text color for better contrast */
    font-weight: 500;
  }

it appears as if the preferred color scheme won't work here because there is a light and dark mode in the theme. in light mode, tables now look like this where the styles in the first column are modified for dark mode but the second is not. but i'm clearly not in dark mode. it might be best to remove the table styling altogether for this as you can see below, the default styles do render nicely in the default theme.

Image Image

we should add some tables (if they don't exist) to our docs to also test this.

Update: it's a style only on the first column. so that should be easy to remove. The style would be ok IF the background was dark, but it's not.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedpyOpenSci would love help with this issue!sprintableAn issue that is ideal for a pyOpenSci sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions