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

Link text isn't readable when text is selected #74

Open
querkmachine opened this issue Sep 16, 2024 · 1 comment
Open

Link text isn't readable when text is selected #74

querkmachine opened this issue Sep 16, 2024 · 1 comment
Assignees
Labels
accessibility Relating to web accessibility issues bug Something isn't working css Relating to CSS or Sass code

Comments

@querkmachine
Copy link
Owner

The underline styles, including colours, are maintained when text is highlighted, however the colour of the text changes. This can make links difficult to read when the text is highlighted.

image

@querkmachine querkmachine added the bug Something isn't working label Sep 16, 2024
@querkmachine querkmachine self-assigned this Sep 16, 2024
@querkmachine
Copy link
Owner Author

I've given this a poke and it doesn't seem that there is a good way of fixing this. Overriding properties of the underline (colour, thickness, offset) don't seem to do anything, and setting text-decoration: none removes the highlight effect entirely.

This is the case on all of the browsers I tested. There appears to be restrictions on allowed styles, in the same manner that styling :visited links is restricted, however the allowlist includes text-decoration properties1. It appears that browsers only interoperably support setting color and background-color.

Footnotes

  1. https://drafts.csswg.org/css-pseudo/#highlight-styling

@querkmachine querkmachine added css Relating to CSS or Sass code accessibility Relating to web accessibility issues labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Relating to web accessibility issues bug Something isn't working css Relating to CSS or Sass code
Projects
None yet
Development

No branches or pull requests

1 participant