Links with Marginalia Notes
Correction (2 January 2016):
There is no
role="aside"
.
There is either the HTML
<aside>
element, or there is the ARIA
complementary
role. Since the HTML parser doesn't allow
<aside>
inside a paragraph,
complementary
it is!
An attempt to create an accessible and more fully-responsive version of the link style used in The Correspondent . The Sarah Kendzior article I was reading is also recommended, separate from the web design. Each link in the main text has an associated marginalia note, describing the linked resource. Hover styles highlight the note when you mouse over the text and vice versa.
In
The Correspondent
, there are actually two versions of the link in the markup: a regular link, displayed on narrower screens, or the linked marginalia note plus a plain text span for wider screens. The switch was done with media queries, however, and the
aria-hidden
attribute
The official definition of
aria-hidden
warns against overuse.
that hides the duplication is never removed when the plain link is hidden with
display: none
. In addition to ensuring that a basic link is always accessible, I wanted to make the text of the note accessible, for screen reader users and also for mobile users.
My markup therefore includes both the link text and the note inside a single, always displayed link, and uses transforms to slide it into view on narrow screens. The note has a role of
complementary
. I'd be interested in other suggestions for how best to indicate that this is a parenthetical note, interrupting the main text, while still being part of the link. I'd also be interested in feedback from regular touchscreen users on the narrow-screen design.
Update:
I created an
alternative version
of the pen that I hope is more mobile-friendly.
Printer's latin follows with two more sample links (that don't actually link anywhere):
Magni optio, ab tempore id cum excepturi ea possimus distinctio dolore eos nulla consequatur No consequences? That was disputed in this article. autem ex ducimus aperiam a repudiandae iusto perspiciatis odit obcaecati culpa, in voluptas. Voluptate, provident fuga.
Ea accusamus, blanditiis rerum An entire chapter on the blandest rerum of all. voluptatum itaque quam suscipit nam, at ullam alias! Ea, eum quia beatae sequi quidem iure voluptas, qui totam, ullam, assumenda mollitia perferendis temporibus a! Quasi, tempora!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestias, suscipit ea quod reiciendis eaque tenetur quis, numquam eum laborum ipsum ipsam similique obcaecati nulla dicta laboriosam omnis provident dolorem voluptates!