{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-link-in-text-block-36f33b9eeee3","title":"Ensure Inline Links Are Visually Distinguishable","summary":"This skill ensures that inline links within text blocks are visually distinguishable from surrounding text, following WCAG 2.1 SC 1.4.1 guidelines. It provides a deliverable that includes verified contrast ratios and hover\/focus states for inline links.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-link-in-text-block-36f33b9eeee3","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-link-in-text-block-36f33b9eeee3","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-link-in-text-block-36f33b9eeee3.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-link-in-text-block-36f33b9eeee3\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Before applying this skill, ensure that the design does not explicitly prohibit underlining links. If underlining is not used, calculate the contrast ratio between the link color and surrounding text using the WCAG relative luminance formula. The first deliverable is a report confirming that all inline links meet the required contrast ratios and have non-color hover\/focus cues.","instructions":"---\nname: link-in-text-block\ndescription: \"Use when applies to hyperlinks (`<a>` elements) that appear inline within paragraphs or text blocks. Does not apply to navigation menus, button-style links, or standalone links that are visually isolated from body text. Use when reviewing CSS that removes text-decoration from inline body copy links.\"\nmetadata:\n  category: accessibility\n  priority: medium\n  difficulty: intermediate\n  estimatedTime: \"10\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/accessibility\/link-in-text-block\n---\n\n# Make links in text blocks visually distinguishable\n\nApproximately 8% of men and 0.5% of women have color vision deficiency (red-green being most common). If links are distinguished only by a color like blue or red, these users may not identify them as links and miss critical navigation or reference information. The underline is a universal, color-independent signal understood across cultures and vision abilities. Removing underlines is a common design trend that disproportionately affects users with low vision and cognitive disabilities.\n\n## Quick Reference\n\n- Color must not be the only visual means of distinguishing links from surrounding text \u2014 WCAG 2.1 SC 1.4.1 (Use of Color)\n- Option 1: Underline links (the browser default and most robust approach)\n- Option 2: If no underline, the link color must have \u2265 3:1 contrast ratio against surrounding body text AND \u2265 4.5:1 against the background\n- Focus and hover states must also maintain distinguishability\n- Applies only to links embedded within paragraphs\/text blocks; standalone navigation links have different requirements\n\n## Check\n\nFind all `<a>` elements within text-heavy containers (paragraphs, article body, list items containing prose). Check the CSS applied: if `text-decoration: none` or `text-decoration: underline` is removed, verify that the link color has at least 3:1 contrast ratio against the surrounding non-link text color AND at least 4.5:1 against the background. Also check `:hover` and `:focus` states for a non-color visual change (underline appearing, outline, background change).\n\n## Fix\n\nThe simplest fix is to restore `text-decoration: underline` on inline text links within body copy \u2014 this is the most widely understood and color-independent link indicator. If the design requires no underline: calculate the contrast between link color and body text color using the WCAG relative luminance formula; it must be \u2265 3:1. Add a non-color visual change on `:hover` and `:focus` (e.g., underline appears, font-weight changes, or background-color is added).\n\n## Explain\n\nWCAG 2.1 SC 1.4.1 (Use of Color, Level A) states that color must not be the sole visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. For links within text, this means a user who cannot perceive the link color must still be able to identify the link. The WCAG technique G183 specifies that a 3:1 contrast ratio between link and surrounding text, combined with a non-color hover\/focus cue, is a sufficient technique. The browser default underline satisfies SC 1.4.1 on its own.\n\n## Code Review\n\nReview the rendered markup and interactive states that affect Make links in text blocks visually distinguishable. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/accessibility\/link-in-text-block\n","use_cases":["Verify that links within paragraphs have sufficient contrast and visual indicators when underline is removed.","Check that hover\/focus states provide non-color cues for links in text blocks."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/link-in-text-block\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-23","created_at":"2026-11-22T16:55:05.000000Z","updated_at":"2026-11-23T04:55:39.000000Z","seo_title":"Ensure inline links are visually distinguishable","seo_description":"Ensure inline links are visually distinguishable from surrounding text using color, underline, or hover\/focus cues. Follow WCAG 2.1 SC 1.4.1 guidelines.","seo_keywords":["WCAG 2.1 SC 1.4.1","inline link distinguishability","accessibility link styling","contrast ratio for links","hover focus link cues"]}}