Manuel Matuzović on Nostr: Here’s a job interview question for you: When you click a button and call the ...
Here’s a job interview question for you: When you click a button and call the showModal() method to open a modal <dialog>, where does the focus go by default, and how can you move it elsewhere?
Can you imagine a job interviewer caring about accessibility and HTML? Me neither, but the question is interesting nevertheless. I didn't know the answer, so I tested it.
https://www.matuzo.at/blog/2023/focus-dialog/Published at
2023-07-17 07:32:59Event JSON
{
"id": "e8b5b797a7a7e5d7bba6f2207c66ae102cd415c6d416f8bfc71b010da7bafc47",
"pubkey": "e1ca52b8e11356a8e151f4b791fcd0437c88940bac97469e9258f17a69800c57",
"created_at": 1689579179,
"kind": 1,
"tags": [
[
"mostr",
"https://front-end.social/users/matuzo/statuses/110728261085430771"
]
],
"content": "Here’s a job interview question for you: When you click a button and call the showModal() method to open a modal \u003cdialog\u003e, where does the focus go by default, and how can you move it elsewhere?\n\nCan you imagine a job interviewer caring about accessibility and HTML? Me neither, but the question is interesting nevertheless. I didn't know the answer, so I tested it.\n\nhttps://www.matuzo.at/blog/2023/focus-dialog/",
"sig": "f3570fb93d2f12c08fe4063808be21a1a55bfe96a0cd2573ca3b54b1e053df02460a16c28ca49fc566c1ff31b47941c86a70a5d3e005340fe786926ce6540559"
}