search form + popover api
Wresting with whether or not I should move forward using the Popover API for a search form, almost solely to delete the javascript code for the same type of interaction.
I’m hung up on default focus *not* going to the search field. I discovered that it’s only a tap of the tab key away, which is very helpful, but that default focus would be the clincher for me.
This probably won’t improve accessibility either.
This is so tempting!
The following Codepen link is a demo of what I’m considering. It’s really, really cool to see this work so easily with two new attributes! Mindblowing.
@asuh
I think this is a case where putting the `autofocus` attribute on the input would be okay.
@cwilcox808 Good suggestion, I added the autofocus attribute and it appears to now focus on the input correctly. I assume that because the form is initially hidden in the DOM that the autofocus attribute won’t force this input to receive focus on load, but I also need to test this theory.
I also need to get a screen reader to listen to what is announced to the user when it opens.