brucelawson,
@brucelawson@vivaldi.net avatar

Who's got the best advice on a11y of <dialog> element? I might get a message from server and need to say to user "data has changed, refresh the page". If I just invoke a <dialog> is that enough? Does it need to be anywhere specific in the DOM?

sbourne,
@sbourne@mastodon.social avatar

@brucelawson @yatil and @aardrian have been posting about <dialog> just today. They might have weird of wisdom for you!

aardrian,
@aardrian@toot.cafe avatar

@sbourne @brucelawson @yatil

It need not be anywhere specific, provided the browser supports the element.

You can test to confirm by playing around with this pen:
https://codepen.io/aardrian/pen/MWPKVbd

brucelawson,
@brucelawson@vivaldi.net avatar

@aardrian Thank you good sir

sbourne,
@sbourne@mastodon.social avatar

@aardrian @brucelawson @yatil "words" not "weird" - picked the right audience to muddle through it I guess 😂

aardrian,
@aardrian@toot.cafe avatar

@sbourne @brucelawson @yatil
Either word is legit with us.

brucelawson,
@brucelawson@vivaldi.net avatar

@aardrian I was personally overjoyed at the compliment, and now feel a little let-down... @sbourne @yatil

brucelawson,
@brucelawson@vivaldi.net avatar

@aardrian Daft Q, but I'm not seeing where you set "inert on the page container that is a peer to the dialog."

aardrian,
@aardrian@toot.cafe avatar

@brucelawson Not a daft question. That statement is simply a lie.

This was me building an experiment prior to a blog post, so I never went back and purged that line (my audience was only ever meant to be me).

I have updated that sentence.

brucelawson,
@brucelawson@vivaldi.net avatar

@aardrian Ah! Thanks old chum. I thought I was losing my residual marble.

aardrian,
@aardrian@toot.cafe avatar

@brucelawson Why not both?

brucelawson,
@brucelawson@vivaldi.net avatar

@aardrian Yikes.

marcus,
@marcus@mastodon.social avatar

@brucelawson This sounds like a dialog of the modal/blocking kind. As far as I know that is the cool part about &lt;dialog&gt; when triggered with the .showModal() JS initiator – dialog placement in the DOM does not matter anymore.

brucelawson,
@brucelawson@vivaldi.net avatar

@marcus Cheers, that's what I thought. But I haven't really looked at it for ages, so my memory might be lying

marcus,
@marcus@mastodon.social avatar

@brucelawson In the before times, without inert and just the ARIA roles and states, it was more of a hassle (de-activating DOM subtrees with aria-hidden="true" and inert, but not the one with the dialog yadda yadda)

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