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

✨ feat: add indicator to external links #443

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

welpo
Copy link
Owner

@welpo welpo commented Nov 29, 2024

Summary

Adds styling to links with external class. The class can be added to external links by the [markdown] (not [extra]) section in config.toml:

[markdown]
external_links_class = "external"

Related issue

This will be merged once getzola/zola#2717 makes it into the next version of Zola.

Changes

Adds reading-direction-agnostic CSS to style external links.

Accessibility

From my research, screen readers needn't mention a link is external; the visual indicator will be ignored.

Note: it's recommended to avoid setting links to open in new tabs (external_links_target_blank setting), as the W3C recommends:

“In general, it is better not to open new windows and tabs since they can be disorienting for people, especially people who have difficulty perceiving visual content.”

Screenshots

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have updated config.toml in tabi-start
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Mastering tabi" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

@welpo welpo added the enhancement New feature or request label Nov 29, 2024
Copy link

netlify bot commented Nov 29, 2024

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit 3654e0c
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/674b1c71d233b70008e3849d
😎 Deploy Preview https://deploy-preview-443--tabi-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@welpo welpo force-pushed the feat/external-link-indicator branch from 965911d to 38c2243 Compare November 30, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant