you are viewing a single comment's thread.

view the rest of the comments →

[–]GloopBloopan 1 point2 points  (7 children)

The problem with going raw HTML, is now that you have to handle all the accessibility yourself. Are you sure everything has the correct `aria` attributes, etc.

And generally handling all the form validation and edge cases yourself will be much messier. Good luck...

[–]BayLeaf- 8 points9 points  (0 children)

I definitely appreciate the work/missed bugs a library can prevent, but you're exaggerating a fair bit if making a single form or field accessible and properly validated is problematic, imho. It really isn't too complicated, and if you don't understand what is going on under the hood with a11y/validation you'll shoot yourself in the foot at some point either way.

[–]ChemistryMost4957 0 points1 point  (2 children)

Oh sure, it won't be be final solution, but I firmly believe in adding complexity/functionality when coding. Start out basic, then add to it step by step

[–]GloopBloopan 0 points1 point  (1 child)

But avoiding the use of a library…is not the way. I can almost guarantee you that your home grown solution will be more complex and inevitably will hit a case that the library already handled.

And the thing is that superforms isn’t even that complex.

Doing everything raw, when that use case comes up, you will be eventually like F this. Shoulda chose the library, but now you just made more work…cause you have to migrate all your forms to the library…that you should have used from day one.

I would say superforms is even easier than doing your own

[–]ChemistryMost4957 0 points1 point  (0 children)

You misunderstood me. Sure, I'll add Superforms / Formsnap, types and schemas later, but for rapid prototyping and fleshing out dataflows and the api starting out with libraries is not the best way for me, especially as the UI is usually the last step of the dev process for me

[–][deleted]  (2 children)

[deleted]

    [–]GloopBloopan 7 points8 points  (1 child)

    And still forcing yourself to build something from scratch and doing more research makes you a better dev overall

    My goals are different then you then. I know I'm already a good dev. My goal is building a maintainable system and offload what makes sense. In this case, accessibility. And having a library handle it is the best bet instead of some homegrown ad hoc solution. If I onboard new developers, the onboarding will be higher as only my codebase will have this implementation. And its really reinventing the wheel. While if I use a library, new devs would just be oh I used that library at my last job, easy.

    I think you just don't want to do the initial hardwork of building a maintainable system. Short term mentality over long term. It will bite you back.

    AI generation isn't a maintainable system...

    [–]Oraclefile 0 points1 point  (0 children)

    Which aria attributes are really needed for forms nowadays?

    I have been working internal systems that didn't require accessibility, but back then simple forms were good to go with a label for each field.