When a link can be clicked but cannot be seen
A decorative image can cover a link while the browser still treats that link as a pointer target. Keyboard focus can arrive there too. A portfolio About-page repair on November 17, 2026 exposed this combination: the interaction checks and the visible page told different parts of the story.
The useful debugging move was to record each part separately. That made a one-value layering correction possible without rebuilding the link list or removing the decoration.
The About page that looked empty
The affected part of the page contained a list of ordinary links beside an illustration. In the before capture, the decorative relief remained visible across the area where the lower content should have appeared. The list was still in the document. A geometric box and an identifiable link could therefore coexist with a page that did not show the expected text.
The relief was fixed in place, covered the viewport and already used pointer-events: none. Its stacking value was 0. The About wrapper, .ab, was positioned with z-index: 1, establishing the local context in which the decoration and content were arranged.
The saved diagnostic identified a link at a point within its rectangle. That result is useful evidence about targeting. The before image is the evidence about the obscured content. Treating the diagnostic as a visibility verdict would have missed the defect shown by the picture.
The repair changed the relief's stacking value from 0 to -1. Its fixed positioning, dimensions, overflow behaviour and pointer setting were retained. In the final capture, the list and neighbouring illustration were visible, including a focused link with a readable label and outline. The recorded package comparison left the other 1,115 files unchanged.
This is a bounded desktop-browser observation. It does not establish screen-reader behaviour, physical-phone testing or identical rendering in every engine. The captures document a specific failure and the corrected painted arrangement.
Keep three questions separate
A useful inspection record has three columns rather than one overall “works” flag:
| Check | What to record | What remains unanswered |
|---|---|---|
| Painting | The label and its surroundings in a capture | Which element receives a pointer |
| Hit testing | The element returned at the chosen point | Whether its text can be read |
| Keyboard focus | The active element and visible focus state | Pointer targeting elsewhere in the box |
Record the browser, viewport and scroll position with the capture. If the link moves between measurements, the point you inspect may no longer refer to the same part of the page. An annotation that says which label was checked is more useful than an unexplained rectangle.
This differs from the clipped-list example in canvas and WebGL accessibility. There, keyboard focus entered HTML deliberately reduced to a one-pixel clipped area. Here, a decorative layer painted across otherwise present content. Both need visible focus checks, but changing clipping would address a different cause.
Pointer transparency leaves the paint intact
The CSS User Interface Working Draft defines pointer-events: none through hit testing. The element's boxes are excluded as pointer targets in the specified way. It does not make their pixels transparent. The same draft also says this property does not prevent sequential focus navigation; descendants can override the inherited pointer setting.
For a decorative cover, that creates a useful warning: a pointer can reach content behind a layer that you still see. The About repair retained this setting because the relief was decoration. The correction concerned its painted position.
Keep an inspection note such as “hit target matches the link” separate from “label readable.” A click recipient is useful information when investigating an obstructed control. It becomes misleading when the report silently turns that information into a statement about appearance.
Why changing the local layer worked
CSS 2.2's painting-order appendix places negative positioned stacking contexts before ordinary in-flow content, after the containing context's own background and border. Zero-level positioned content is handled later. These relative positions explain how a decorative cover can obscure text despite sharing the surrounding layout.
The important boundary was the About wrapper's context. Giving the relief -1 placed it earlier within that local order. The value was not a universal promise to sit behind everything on the page. Removing the wrapper's context, or moving the relief elsewhere in the tree, would require another review.
The frame and stacking-context example examines a different problem: a large child value cannot escape its parent's position against a sibling context. Here the misleading signal was a successful hit test through a painted cover. Start with the observed failure before choosing which stacking rule to investigate.
A tiny fictional cover
The following complete file reduces the situation to a link and an opaque rectangle. It is a fictional teaching example, not a copy of the portfolio page or a claim that this fixture has been browser-tested. The solid colour makes the overlap easy to inspect without downloading an image.
<!doctype html>
<meta charset="utf-8">
<title>Paint and pointer example</title>
<style>
.sample {
position: relative;
z-index: 0;
padding: 3rem;
background: #eef1f5;
}
.sample a { display: inline-block; color: #17202c; }
.sample a:focus-visible {
outline: 3px solid #ffcf45;
outline-offset: 4px;
}
.decoration {
position: absolute;
inset: 0;
z-index: 0;
background: #17202c;
pointer-events: none;
}
</style>
<section class="sample">
<a href="#details">Read the sample details</a>
<div class="decoration" aria-hidden="true"></div>
</section>
<p id="details">The link destination is ordinary page content.</p>
Save it locally and inspect the link's area. Then change only the decoration's z-index to -1 and compare the page again. Keep the .sample context in place for this comparison. Its light background gives the dark link text a clear surface once the cover is ordered behind it.
Use Tab to reach the link, inspect its label and focus indication, and activate it with Enter. Focus outlines deserve their own visual check; an outline and the enclosed text need not produce the same apparent result in every arrangement. Record what your browser draws rather than filling in a predicted result sheet.
The example uses absolute positioning to keep the overlap inside one small section. The real relief was fixed across the viewport. That simplification makes this file easier to inspect, while leaving the real page's scroll behaviour for its own test.
Probe targeting without calling it visibility
With the sample in view, this console snippet checks the centre of the link's rectangle:
const link = document.querySelector('.sample a');
const box = link.getBoundingClientRect();
const hit = document.elementFromPoint(
box.left + box.width / 2,
box.top + box.height / 2
);
console.table({
targetMatches: hit === link || link.contains(hit),
hasFocus: document.activeElement === link
});
CSSOM View defines this API using viewport coordinates and eligible hit-test targets. Its Working Draft explicitly warns that the returned element need not be the topmost painted one. Run the probe while the selected point is inside the viewport. A centre outside it does not provide the intended comparison.
A child span may be the returned element, which is why the snippet accepts descendants of the link. Neither reported value examines the text's painted contrast or the pixels in the cover. Pair the output with a capture at the same scroll position. Keep that capture in the review record instead of renaming targetMatches to visible.
Review the correction at its boundaries
After a layering change, revisit the lower and upper edges of the section. On the About page, the relief covered the viewport, so inspecting only the newly readable list would leave neighbouring content unexamined. Check where the decoration begins and ends, whether text remains readable as you scroll, and whether controls outside the list still appear in the expected order.
Repeat the route into the affected area through keyboard navigation. A saved focus outline proves something about that captured state; it does not show the whole journey. Record the preceding control, the focused label and the following control so another reviewer can repeat the same sequence.
Also inspect the page with its expected layout variants. A static screenshot cannot tell you how a narrower viewport wraps the list or whether a loading transition briefly changes the layer order. These are follow-up checks to perform, not results established by the November 17 captures.
Keep content available in HTML, as discussed in static HTML first, and include painted review in the release check. The presence of an anchor, a successful hit-test result and a good capture are complementary observations. Keeping their labels precise makes the remaining work visible to the next person reviewing the page.
Checklist
- Record the readable label and focus indication in a capture.
- Name hit-test output as targeting evidence, with the point and scroll position.
- Identify the containing stacking context before changing a layer value.
- Change one ordering rule, then inspect neighbouring content and keyboard travel.
- State which browser states were checked and which remain untested.
Questions and answers
Does pointer-events: none make a layer invisible?
No. It changes pointer targeting. A decorative layer can continue to paint over a link while allowing a pointer to reach that link.
Can elementFromPoint prove that a link is visible?
No. It identifies a hit-test target at a viewport coordinate. CSSOM View specifically allows the result to differ from the topmost painted element.
Should every decorative background use z-index: -1?
No. The value works only with the intended stacking context and surrounding layers. Verify the parent, background and adjacent sections before adopting it.
Does a successful Tab stop finish the check?
No. Check the focused element, readable label, visible focus indication and activation separately. Keyboard reachability alone leaves visual questions unanswered.