You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A very common UI pattern these days is to have headings (and sometimes other elements with an ID) provide a link to themselves, to make it easy to grab a link specifically to that element. Both Bikeshed and ReSpec specs do this for all headings (and for some other elements); GitHub does this for headings in Markdown files; tools like https://github.com/daviddarnes/heading-anchors exist to make it easy to get this effect in HTML; etc.
We should consider adding this as a pseudo-element for convenience to authors, so they don't have to either add some busywork markup, run a preprocessing step, or run JS over their page, just to get useful self-links.
Previously this wasn't really doable; at the moment, pseudo-elements aren't focusable in Chrome, for example. But we're fixing that for Carousel-related purposes, since that proposal also has navigation-related pseudo-elements that need to be part of the page's focus order. I'll assume that this is indeed fixed in UAs, so a pseudo can participate in the focus order and other AT features the same as an actual link element; we could put a requirement in the spec that UAs have this behavior before they implement this pseudo.
Proposed behavior:
New pseudo, named ::self-link (or ::anchor-link, or something else).
Similar to ::before/etc, only exists if content isn't none. Also requires the originating element to be linkable, per the host language's semantics. (In HTML, this means the element has an ID.)
If created, functions as a hyperlink to its originating element.
In the box tree, placed immediately after ::before, I think? Possibly we can go with an approach like Carousel and have a property that controls whether it shows up at the start (just after ::before) or at the end (just before ::after) of the originating element.
AT-wise, treated identically to an actual link, in the host language's semantics, placed at that location. The UA can automatically provide a more informative accessible name, tho. (Rather than the symbol that's usually used for its content.)
This is potentially better done as an HTML feature, fwiw, tho that would require adding an attribute or whatever to every element you want to apply this to. That's certainly far less work than adding the markup by hand is today, but it's not nothing, and generally you'll want to apply this to all headings/etc in your document, with identical behavior across all of them, so having an HTML attribute isn't great usability-wise.
The text was updated successfully, but these errors were encountered:
A very common UI pattern these days is to have headings (and sometimes other elements with an ID) provide a link to themselves, to make it easy to grab a link specifically to that element. Both Bikeshed and ReSpec specs do this for all headings (and for some other elements); GitHub does this for headings in Markdown files; tools like https://github.com/daviddarnes/heading-anchors exist to make it easy to get this effect in HTML; etc.
We should consider adding this as a pseudo-element for convenience to authors, so they don't have to either add some busywork markup, run a preprocessing step, or run JS over their page, just to get useful self-links.
Previously this wasn't really doable; at the moment, pseudo-elements aren't focusable in Chrome, for example. But we're fixing that for Carousel-related purposes, since that proposal also has navigation-related pseudo-elements that need to be part of the page's focus order. I'll assume that this is indeed fixed in UAs, so a pseudo can participate in the focus order and other AT features the same as an actual link element; we could put a requirement in the spec that UAs have this behavior before they implement this pseudo.
Proposed behavior:
content
isn'tnone
. Also requires the originating element to be linkable, per the host language's semantics. (In HTML, this means the element has an ID.)This is potentially better done as an HTML feature, fwiw, tho that would require adding an attribute or whatever to every element you want to apply this to. That's certainly far less work than adding the markup by hand is today, but it's not nothing, and generally you'll want to apply this to all headings/etc in your document, with identical behavior across all of them, so having an HTML attribute isn't great usability-wise.
The text was updated successfully, but these errors were encountered: