THE GITHTML FIELD GUIDE
Why a visible HTML link will not respond to a tap
A visible link may be blocked by another element or by pointer-events styling even when its destination is correct. Compare pointer interaction with keyboard activation and inspect the element receiving the tap. Do not use pointer-events: none as a general disabled-link mechanism because it does not consistently remove other ways of reaching the link.
Identify the specific failure
A transparent decorative layer can intercept taps without appearing to cover the link. Conversely, pointer-events: none on the link can make taps pass through it. These cases need different repairs, so changing the URL first is unlikely to help.
Make a narrow correction
Inspect the hit target and the styles inherited by the link. Move decoration behind the content or make only genuinely decorative overlays ignore pointer events. Keep real controls interactive and give unavailable actions an explicit explanation instead of a misleading active appearance.
- Confirm the element receiving the pointer event rather than assuming the label is the target.
- Check inherited pointer-events values and overlapping decorative containers.
- Retest keyboard access after changing pointer behavior to avoid inconsistent availability.
.decorative-overlay { pointer-events: none; }Use a two-path activation test to isolate the cause
Start with a link that has a valid href and no apparent error message. Focus it with a keyboard and activate it, then return and try a pointer at the center of its label. If keyboard activation works while the pointer does not, the destination is probably not the first thing to investigate. Inspect the box under the pointer, including pseudo-elements and transparent children. A decorative element can cover a surprisingly large rectangle even when the visible ornament occupies only a small part of it.
Suppose a section's fade-out effect uses an absolutely positioned overlay extending across its final paragraph. Only the links inside that rectangle fail to respond. Disabling the overlay in inspection should restore them without changing their URLs. If the overlay is purely decorative, allowing pointer events to pass through that decoration is a focused correction. If the overlay contains a real Expand control, making the whole region ignore events would also disable that control; separate the decorative area from the interactive element instead.
A link with pointer-events: none presents another diagnostic pattern: it can remain in the sequential keyboard focus order even though taps pass through it. That is why the property is not a complete unavailable-state implementation. For a static report, an unavailable destination is usually better represented by explanatory text. After repairing an active link, test its entire visible label and neighboring controls. A solution that works only at a tiny uncovered edge is still a broken target, even if one carefully placed tap succeeds.
Verify the repaired artifact
Try tapping near the label's edges and activating the same link with a keyboard. Both routes should have a deliberate result.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.