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

Support link underlines accessibility setting #1935

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Conversation

dotNomad
Copy link
Collaborator

@dotNomad dotNomad commented Jul 3, 2024

VSCode 1.91.0 added a new setting accessibility.underlineLinks which does what it says on the tin

To make links easier to distinguish from regular text in the workbench, you can enable the setting accessibility.underlineLinks to underline links.

https://code.visualstudio.com/updates/v1_91#_link-underlines

This PR ensures all of our text links (<a>) support the feature and toggle appropriately.

Preview
CleanShot.2024-07-03.at.15.00.56.mp4

Intent

Resolves #1934

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

The injected CSS does the below

.monaco-workbench p>a {
    text-decoration: var(--text-link-decoration);
}

The --text-link-decoration variable changes based on the setting.

To support this, anywhere do an text anchor link we could use that CSS variable, or if it is text we can wrap the anchor in a p element. I did the latter here.

Copy link
Collaborator

@sagerb sagerb left a comment

Choose a reason for hiding this comment

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

LGTM

@sagerb sagerb merged commit 190efac into main Jul 9, 2024
12 checks passed
@sagerb sagerb deleted the dotnomad/link-underlines branch July 9, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support underlineLinks VSCode setting
2 participants