Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was ultimately disappointed in HTML5 even though it was supposed to bring HTML into this era, with things like audio/video tags and new input methods for phone numbers and the like for mobile users. But ultimately it fell flat, was incomplete, and it feels like it's been stagnant again since HTML5 came out.


Yep in 2024 we still haven’t found a generic datepicker and hundreds of people on the internet are coding their own version. HTML5 snafu


What is wrong with <input type="date">?


Timezone support, no date ranges (eg from-to), date formats are a mess (mdn: "At the moment, the best way to deal with dates in forms in a cross-browser way is to have the user enter the day, month, and year in separate controls, or to use a JavaScript library such as jQuery date picker."), often rules are needed (eg only weekdays), non gregorian calendars, ...

A good date input would cover at least like 80-90% of use cases in my opinion. From experience it's currently more something like ~40% or so.


HTML5 was definitely a mixed bag. On the on hand, it gave us cleaner markup.

On the other hand, now we have auto-playing videos on every other page.


But how about Web Components? Finally, it seems, there's something reusable, and something reasonably framework-neutral.


You will need to wait another 10-15 years before they overcome the issues that they caused for themselves (while twisting and contorting the platform in unpredictable ways): https://threadreaderapp.com/thread/1717580502280867847


is it that nice?

the beauty of HTML markup is that it's declarative. at least from the tutorials I've seen, WebComponents drag you firmly back into imperative land with document.addChild everywhere.


The imperative part is required to build a Web Component.

When you merely import it. you can use it as declaratively as any other HTML tag. Basically Web COmponents allow you to add your own tags that are rendered as components, and freely mix "built-in" and "custom" DOM nodes in your document.


I'm pretty sure a declarative shadow Dom is currently in the works.


Web Components are how you can create user-land HTML elements.

But there is a widespread desire for better native HTML elements.

E.g., a date range input.


I'd say that it's the other way around, and native elements that are not system-dependent (say, a video player) should lose prominence. There's no reason to have a "native-looking" button on a web page, which otherwise cannot (and should not) be made native-looking.

Instead I expect the industry to stabilize around a few widespread sets of web components, much like a lot of CSS for controls stabilized around Bootstrap's styles.


Which controls stabilized around Bootstrap styles (now there's a a name I haven't heard in a long time)?

No, industry should not and will not stabilize around "few widespread sets". For the simple reason: it's extremely difficult to create a proper userland UI control in the browser. How many custom drop downs fail even the most basic keyboard behaviours? How many custom UI elements fail even the most basic screenreader interactions? etc. etc.

What you really truly need is a rich browser-native set if controls, and https://open-ui.org/ is slowly working towards that.

Related: You can't capture the nuance of my form fields https://web.archive.org/web/20230208235009/https://drewdevau...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: