pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
623 stars 323 forks source link

Proposed Design Update for Focus State - Links #1397

Closed smeragoel closed 6 months ago

smeragoel commented 1 year ago

TL;DR:

This issue proposes a new design for the focus state of links, aiming to meet WCAG 2.1 guidelines. We have three options:

Design Options
![image](https://github.com/pydata/pydata-sphinx-theme/assets/98317216/11aa3fc6-c852-4cc0-8562-56f0eb4aa593)

Feedback from the team is needed to finalize the focus state design.

Background on WCAG requirements (courtesy of @trallard)

Proposed Design Options

Design Options
![image](https://github.com/pydata/pydata-sphinx-theme/assets/98317216/11aa3fc6-c852-4cc0-8562-56f0eb4aa593)
  1. Box style with monochromatic teal color
  2. Underline style with monochromatic teal color
  3. Box style with teal + purple colors

Here is a demo of these options in light and dark mode:

Light Mode
![image](https://github.com/pydata/pydata-sphinx-theme/assets/98317216/22dfe332-d48d-47ca-b8f2-9dc07ea4096d)
Dark Mode
![image](https://github.com/pydata/pydata-sphinx-theme/assets/98317216/9250f5d4-6d22-41d6-a30b-0dd9db666443)

My opinion:

For style, I prefer box over underline. Because links have an underline in general, I think adding just a thicker underline in focus states could be missed, and adding a full box would be a more visible change. So (1,3) > (2) For colours, I think that the monochromatic colour scheme is better. I see some visual vibrations with the purple in dark mode, and I added that option to show how that would look, and I feel the monochrome version is more visually stable. So (1,2) > (3)

Overall, I would rank the options like this: 1 > 2 > 3

12rambau commented 1 year ago

I don't have any specific competence in accessibility design so this is just me thinking out loud. I fully agree that underlying is not differentiating enough wit the normal links. It's so much different that I first thought you wanted to change the hover state (yes it's 7:00 here and my coffee is still in its mug). So for me 2 is a strong no. I agree with your color analysis, monochromatic blends better in the template. It will also be easier to maintain as it will always work in both theme.

trallard commented 1 year ago

I am in favour of 1 too: Box style with monochromatic teal color

it is the right balance between being noticeable and not too on your face or distracting

drammock commented 1 year ago

I also endorse option 1. Sounds like we're unanimous: full speed ahead!

trallard commented 1 year ago

Nice one team. @gabalafou will be taking on the implementation of this one.

trallard commented 6 months ago

Completed via #1564