score:0

i can confirm that the code is not compliant. you can double-check whether this code validates by:

  1. inspecting this element in the developer console (before the button is clicked)
  2. copying the rendered html to the clipboard
  3. loading http://validator.nu and selecting the ‘textfield’ option
  4. pasting your html between the <body></body>tags
  5. clicking ‘validate’

as you’ll see, the code does not validate, because, as oobgam mentioned, the target id is not initially present in the dom.

there are a number of different approaches to fixing this. once i understand which design pattern you’re trying to accessibly support, i can provide more concrete advice.

can you please provide more information about why you chose this implementation? how do you see desktop and mobile users interacting with this, and to what end?

quora has a good list of related patterns at what's the difference between a modal, a popover and a popup?


Related Query

More Query from same tag