Replies

This profile is from a federated server and may be incomplete. Browse more on the original instance.

siblingpastry, to javascript
@siblingpastry@mastodon.world avatar

Here's a very-niche but then-very-useful trick I realized today -- you can create empty text-nodes to use as node references, for things like DOM insertion, range boundaries, or whatever.

I needed this to set the end of a range immediately before an element's closing tag, when references to existing child nodes might be invalidated by race conditions.

You don't even need to persist the references for removal, since a single call to context.normalize() cleans them all away.

siblingpastry,
@siblingpastry@mastodon.world avatar

@ollicle Interesting, I hadn't considered using comments. They'd have to be manually cleaned-up though. Could probably use cdata nodes as well.

What do you mean by, play alongside?

siblingpastry,
@siblingpastry@mastodon.world avatar

@ollicle Oh you were asking about dealing with sibling text nodes? Yeah, that :-) Normalizing isn't something you tend to need very often, but it's uniquely useful when you do.

That's a good point about spotting in dev tools, I guess it would depend on what you needed. If the nodes need to be around for a while, it would be more useful to be able to inspect them. My use-case is very transient, they're added and gone again in the space of a synchronous function call.

urlyman, to random
@urlyman@mastodon.social avatar

Wonder if anyone will keep track of appearances gifted by mainstream media to Farage et al during campaigning, vs visibility given to the Green Party

siblingpastry,
@siblingpastry@mastodon.world avatar

@urlyman gammontracker.co.uk is available 💡

urlyman, to random
@urlyman@mastodon.social avatar

Policy stealing between Labour and the Tories seems to be more of a two-way street than it should be.

The texture of Labour’s response to the National Service thing is going to be… informative

siblingpastry,
@siblingpastry@mastodon.world avatar

@urlyman It’ll be the same principle, except that conscriptees will be made to do content moderation and social services risk assessments.

urlyman, to random
@urlyman@mastodon.social avatar

Good thread. Thanks Geof and Matthew https://climatejustice.social/@GeofCox/112502615002807247

siblingpastry,
@siblingpastry@mastodon.world avatar

@urlyman That diagram has its x-axis the wrong way round

urlyman, to random
@urlyman@mastodon.social avatar

regex search within in-page search – cmd-F (ctrl-F) – would be handy

siblingpastry,
@siblingpastry@mastodon.world avatar

@urlyman Fancy building a Chrome extension? The core functionality would be fairly trivial, the tricky bit would be learning how to use the extensions API lol.

(Which I'm presuming is mostly great with a side-order of intensely frustrating in some randomly specific ways.)

siblingpastry, (edited ) to random
@siblingpastry@mastodon.world avatar

fyi. Sonoma 14.5 includes some changes to the QuickNav feature in VoiceOver, and after I updated, it was turned on by default.

Some hours of confusedly testing why none of my JS key handling scripts are working anymore, turned out to be that -- unmodified arrows and navigation keys aren't passed through to JavaScript when QuickNav is on.

(You have to hold Option. I don't know if that was always the case, I didn't know about QuickNav until today.)

siblingpastry,
@siblingpastry@mastodon.world avatar

There was also a Heisenbug where aria-live regions completely stopped working. But I can't reproduce that now, all variants work fine, so no idea wtf.

siblingpastry,
@siblingpastry@mastodon.world avatar

But in the course of testing to determine this, I've also learned that interactive grids work in VoiceOver now (e.g., https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/data-grids/)

That's definitely new, right? I didn't just hallucinate it not working for the last couple of years??

siblingpastry,
@siblingpastry@mastodon.world avatar

@meduz I think that's the usual default, yeah.

whitingx, to random
@whitingx@mastodon.cloud avatar

🌄 The Problem with .

“The history of fiction proves that we can’t even imagine a better world.”

https://quillette.com/2024/05/23/why-we-must-walk-away-from-omelas-the-problem-with-utopias-authoritarianism-science-fiction/

siblingpastry,
@siblingpastry@mastodon.world avatar

@whitingx Even Star Trek couldn't keep it up. Roddenberry's vision of utopia is riddled with hypocrisy and holes, it side-steps privacy and diversity questions (or handles them crassly), and its economics completely fall apart if you give them more than a cursory glance.

siblingpastry, (edited )
@siblingpastry@mastodon.world avatar

@otfrom @whitingx I can’t speak to the general point, but this article is very clear in denouncing Utopianism as a bedfellow of eugenics.

siblingpastry, (edited ) to keyboard
@siblingpastry@mastodon.world avatar

I've been playing around with keyboard scrolling of overflow regions, and I was interested to note how Firefox's native behavior doesn't expose any additional semantics -- i.e., it doesn't apply a role or accessible name when the scrolling region becomes focusable.

And I think that's the right thing to do -- that our standard workaround of including role="region" and aria-label or aria-labelledby (along with tabindex="0") creates unnecessary verbosity.

(1/3)

siblingpastry,
@siblingpastry@mastodon.world avatar

@cwilcox808 Not that I know of, it doesn't seem to expose anything in the DOM. There's a change in the accTree (the element gains a "focusable" state) but nothing that JS can read, as far as I know.

siblingpastry,
@siblingpastry@mastodon.world avatar

@ben Exactly so, it still defaults to -1 (which is silly really, the default for that property should be null, but that ship has long sailed lol).

@cwilcox808

siblingpastry,
@siblingpastry@mastodon.world avatar

@ben

There is blue-sky talk of providing API access to the accTree, but I'm not sure when or if that will happen, and I'm not convinced it's a good idea anyway, too much potential for good-intention breakage.

@cwilcox808

urlyman, to random
@urlyman@mastodon.social avatar

Been wielding font-variant-numeric: tabular-nums which makes things line up proper.

Was going to make a shit joke about CSS numchucks but then realised it’s nunchucks – which also sounds like a cruel sport

siblingpastry,
@siblingpastry@mastodon.world avatar

@urlyman Makes me think of It’s a Knockout

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • rosin
  • Durango
  • cisconetworking
  • mdbf
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • osvaldo12
  • Youngstown
  • ethstaker
  • slotface
  • kavyap
  • JUstTest
  • thenastyranch
  • normalnudes
  • modclub
  • khanakhh
  • everett
  • tacticalgear
  • cubers
  • GTA5RPClips
  • anitta
  • Leos
  • tester
  • provamag3
  • lostlight
  • All magazines