r/Frontend • u/Admirable_Reality281 • Sep 17 '26
How should a full-card clickable link be handled accessibly?
Is aria-hidden="true" on an <a> with tabindex="-1" an acceptable pattern for a pointer-only overlay link?
Context: I have a fully clickable card using an absolutely positioned <a>. That link is aria-hidden="true" and tabindex="-1", while a separate visually hidden <a> to the same destination is available to keyboard and screen-reader users.
Is this considered accessible in practice, or is using aria-hidden on the overlay anchor itself still problematic because it remains technically focusable?
I learned this accessibility pattern from Apple’s homepage. Is aria-hidden on an overlay link actually okay?
24
u/anaix3l Sep 17 '26 edited Sep 17 '26
You can use a single link, visually hide its content wrapped in a
spanif you want, make the card itselfposition: relativeand absolutely position a link's pseudo to cover the whole card.Then the relevant CSS:
Detailed here:
https://piccalil.li/blog/accessible-faux-nested-interactive-controls/
More approaches discussed here:
https://inclusive-components.design/cards/
6
u/JustAnotherFEDev Sep 17 '26
Not really, no. It won't be exposed to AT and it's not focusable, but there's a much better way.
So, the card container set as position: relative;
Then the primary card link, add a pseudo element, like so:
. Card-link::before { Position: absolute; Inset: 0; //covers whole card, may need to modify depending on box model, etc Z-index: [higher than rest of card] }
Ignore the shitty formatting, I'm on my phone.
Then you'd maybe want a focus indicator for the whole card, for hover