i swear to god i can't find this by searching and it's driving me up the fucking wall

i'm trying to build an image modal using the <dialog> element

for some reason, the dialog element itself is focusable. i did not do this. i did not put tabindex on it. there is no interactivity on the dialog element itself. why the fuck is it focusable. i just want the close button to be focusable for goodness sake (and it is, and it's autofocused, that's nice at least, but why in the fresh hell can i tab back to the whole fucking dialog element when *i can't interact with it*??????)

i'm going to make a fresh page just to see if a dialog element i have done 100% nothing to is focusable just to cofirm that this isn't me but i'm pretty sure it's just *doing that*
yeah they're focusable by default why is that
you can't interact with them directly??????? afaik????? what am i missing
also ngl it's hard as fuck to find any information on accessible image modals that isn't outdated and telling you to just build a modal from a div

i wrote up an entire div modal because of bad tutorials before rewriting the whole thing for the dialog element

fuck me sideways

in other news the accessibility tree is complaining that the dialog element doesn't have keyboard support despite being focusable.

WHY IS IT FOCUSABLE

it's NOT EVERY BROWSER EDGHE DOESN'T DO THIS

firefox wtf

firefox

goddammit firefox

should i??????? set tabindex?????????? on the thing mdn says don't set tabindex?????????????????

i don't think they meant don't set it to -1 tbf

i think they meant don't set tabindex to make it focusable

i would like to cry
anyway i need further sr testing on this site but for now. i will lay down and cry.
by which i mean cuddle kes he's very helpful
kestrel the web developer
@inherentlee oh yeah i was trying to link to such resources the other day but couldn’t 😭
@twinkle honestly i might write up what i did just so there is more of something out there but i feel very tenuously about my solution