Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure consistent link underline and color on hover #14914

Closed

Conversation

s596757
Copy link

@s596757 s596757 commented Aug 3, 2023

Made CSS changes in order to ensure all links are visually distinct:

All links are now underlined as standard expectation based on:
https://www.w3.org/TR/html401/struct/links.html
When you hover over a link, the link is both bold and underlined
Link that has been visited changes to a grey color
Tested visually
Based on feedback from UX engineer

Ticket based on issue #9399 Text issue number 2

Please provide additional feedback and notes on your definition of visually distinct

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All links are now underlined as standard expectation based on: https://www.w3.org/TR/html401/struct/links.html

This is not what the document linked to says - it says for example underlined

When you hover over a link, the link is both bold and underlined

I do not agree with this design direction. All of the web uses underline on hover. Using bold on hover will lead to layout shifts. So this is -1 from me here.

Link that has been visited changes to a grey color

Changing colour to indicate visited links is probably fine, but I would request to add a semantic variable so that themes (and users) can override it easily.

packages/rendermime/style/base.css Outdated Show resolved Hide resolved
s596757 and others added 2 commits August 9, 2023 14:20
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
@s596757
Copy link
Author

s596757 commented Aug 9, 2023

All links are now underlined as standard expectation based on: https://www.w3.org/TR/html401/struct/links.html

This is not what the document linked to says - it says for example underlined

When you hover over a link, the link is both bold and underlined

I do not agree with this design direction. All of the web uses underline on hover. Using bold on hover will lead to layout shifts. So this is -1 from me here.

Link that has been visited changes to a grey color

Changing colour to indicate visited links is probably fine, but I would request to add a semantic variable so that themes (and users) can override it easily.

  • I have done as suggested: I have created 2 semantic variables to make different stages of links different. I have applied these variables to the links as can be seen. Please review and provide feedback on whether you agree with changes or suggest something else

@s596757 s596757 requested a review from krassowski August 9, 2023 15:21
Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My previous opinion that we should not switch to underline/bold still stands. However, I do think that maybe it could be opt-in via a setting (which would involve creating a dedicated accessibility package).

packages/rendermime/style/base.css Outdated Show resolved Hide resolved
packages/extensionmanager/style/base.css Outdated Show resolved Hide resolved
packages/rendermime/style/base.css Show resolved Hide resolved
@fcollonval fcollonval added the bug label Aug 10, 2023
@fcollonval fcollonval added this to the 4.0.x milestone Aug 10, 2023
@krassowski
Copy link
Member

@s596757 the lint job is failing can you run jlpm run prettier?

@krassowski krassowski mentioned this pull request Aug 20, 2023
1 task
@s596757
Copy link
Author

s596757 commented Aug 21, 2023

jlpm run prettier

@krassowski I have run it :)

@krassowski
Copy link
Member

@s596757 did you commit and push changes? The lint check is still failing with:

Checking formatting...
[warn] packages/rendermime/style/base.css
[warn] packages/theme-dark-extension/style/variables.css
[warn] Code style issues found in 2 files. Run Prettier to fix.
+ echo 'Please run `jlpm run prettier` locally and push changes'
Please run `jlpm run prettier` locally and push changes

@krassowski krassowski changed the title changed css styling for links Ensure consistent link underline and color on hover Sep 23, 2023
@krassowski
Copy link
Member

@s596757 I addressed the lint failure for you, can you add before/after screenshots in both light and dark mode to the top-level comment, please?

@krassowski
Copy link
Member

Closing in favour of #15181.

@krassowski krassowski closed this Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants