soupslurpr / BeauTyXT

A beautiful, private, secure, and minimalistic Text, Markdown, and Typst editor.
https://beautyxt.app
ISC License
103 stars 7 forks source link

Insufficient contrast for links in the Markdown preview in dark mode #153

Closed rockygolucky closed 5 months ago

rockygolucky commented 5 months ago

I noticed that the contrast of the link in the preview is not enough at all. The link color is very dark against the background. This is an accessibility issue.

To reproduce

  1. Toggle Android system dark view.
  2. Create a link in a Markdown file.
  3. Toggle the Markdown preview.
  4. Observe the text foreground against the background in the Markdown preview; it’s quite dark.

Screenshot

The file editor with a file named beauTyXT-contrast.md that has an autolink to https://example.com and a Markdown preview open

The https://example.com autolink in the above screenshot is very dark on the dark gray background. It’s difficult to see.

External links

System information

soupslurpr commented 5 months ago

Hi, thanks for letting me know about this important accessibility issue. I think I've solved it by specifying the color of the link to adapt to Material 3/You (just like the background, which is normally white).

I'd appreciate it if you'd try it out with the staging apk attached below and provide feedback. It can be installed alongside the production build as this one has a .debug prefix. Please note that this staging apk doesn't have the Typst libraries included to reduce file size, so it's expected that the app will crash upon opening Typst projects.

app-staging.zip

rockygolucky commented 5 months ago

I think I've solved it by specifying the color of the link to adapt to Material 3/You (just like the background, which is normally white).

I'd appreciate it if you'd try it out with the staging apk attached below and provide feedback.

Yes, that went perfectly. Thank you! I opened up the same file and I saw the link as light green.

Screenshot

A file opened named beautTyXT-contrast.md is just an autolink to https://example.com. The Markdown preview has a higher contrast, light green color against the dark gray.

The above screenshot shows that the autolink is displayed in bright green, consistent with my Material 3/Material You theme.

soupslurpr commented 5 months ago

Thanks for the feedback, I'll make a new release soon!