There is really no way to implement this in JS anyway because all major browsers have native date pickers by now: https://caniuse.com/input-datetime
There is really no way to implement this in JS anyway because all major browsers have native date pickers by now: https://caniuse.com/input-datetime
Yes, you do want to be careful about accessibility here, but it’s emphatically not a “please please please don’t do this” situation. Because its essence is just a text box, the accessibility of what’s been made here is probably actually excellent, and if it’s not, it should require only minor tweaks to make it so. You very probably actually don’t want to expose the popup in any way—for what I see, doing literally nothing for accessibility will probably be better in most instances than doing something.
It's not. The whole thing is in a <table>, there's no ARIA attributes let alone ones that reflect states, and the buttons are...<li>'s?
> doing literally nothing for accessibility will probably be better in most instances than doing something
This is a great example of why that's true. If the author had referenced any of the best practices for this, they wouldn't have ended up with such a bad result.
https://www.w3.org/TR/wai-aria-practices-1.2/examples/combob...
I’d be interested to see what a regular user of accessibility stuff would find of this stuff. I think both approaches are perfectly reasonable, with the don’t-expose-the-popup-at-all side possibly even preferable for some.
A11y and web components are well studied, start from the best practices, and if you deviate, have a good reason why that's supported by testing.