Building Custom Form Selection Boxes – Working on Accessibility / / No Comments Whenever I find myself needing to update a previous blog post, I either correct it inline and add a small note on top, for small tweaks, or write a whole new piece for larger changes. My last blog post talked about how to use CSS to style a "block" such that it acted like a form radio button. When I worked on that demo, I was a bit worried about accessibility. I did one quick check with an online tool, and thought I was ok. I was not. When I shared my post on LinkedIn, Kevin Bonett shared this feedback with me: I would argue that, despite using correct semantic HTML, the “custom” radio buttons are inaccessible. If you’re a sighted keyboard user, how will you know... more → Posted in: JavaScript Tagged with: accessibility, Boxes, building, custom, form, Selection, working
Building Custom Form Selection Blocks – no JS, all CSS / / No Comments I apologize for what may be a slightly misleading title. The topic for this post is something I’ve had on my list of things to explore for some time now, and while I wait for the new job to start, I’ve found myself with time to kill. Let me explain what I’m talking about and hopefully it will make a bit more sense. You are, dear reader, familiar with form controls and how to build forms both big and small. One type of user interface I’ve seen from time to time is the ability to select an item where the "item" is an arbitrary block of code. What do I mean by that? Typically a choice element in a form is either a select, checkbox, or radio set. But I’ve seen... more → Posted in: JavaScript Tagged with: Blocks, building, custom, form, Selection
Building a Form Handling Service in Val Town / / No Comments Many years ago, I made the switch from building primarily app-server backed sites (using Node, ColdFusion, PHP, etc) to fully static sites using tools like Jekyll, Hugo, and Eleventy. For the most part, it was a great shift in how I build, but there were a few things I had to figure out in that new world – one of them was simple form handling. While I could have used serverless just fine, it felt like overkill. Luckily, there were a few services out there that catered to this need. You would simply use a unique action for your form and that service would handle collecting the form data, emailing it to you, and redirecting the user back to the site. A great example of this, and one I used... more → Posted in: JavaScript Tagged with: building, form, handling, service, Town
Parsing Uploaded Resumes into Form Fields with Google Gemini / / No Comments As I’ve recently become somewhat familiar with job application sites (sigh, thanks Adobe), I’ve noticed an interesting feature some sites use. After selecting your resume to upload, they will parse the resume and either offer to, or automatically, fill in some of the form fields of the application for you. I thought it would be interesting to try this myself making use of Google’s Gemini APIs. Here’s what I discovered. The Test Script As always, I began with a script that would take a hard-coded resume and attempt to parse it. For the most part, this is basic "upload a file and ask the AI to talk about", but in my case, I wanted a very particular set of data... more → Posted in: JavaScript Tagged with: Fields, form, Gemini, Google, into, Parsing, Resumes, Uploaded
Adding Form Participation Support to Web Components / / No Comments Many years ago when the web platform began to really improve, when everything was "HTML5 this" and "HTML5 that", I remember being particularly excited by the updates to forms. I started my web career doing a lot of form processing and have always thought it was one of the more important aspects of the platform. Anything that improved that was a good thing. In my explorations of web components, I was ecstatic to discover that web components can be participants in forms. So what do we mean by that? What’s a Form Field? # Form fields have a number of different features, including: Including a name and value as part of the overall form. This is the bare minimum thing a... more → Posted in: JavaScript Tagged with: Adding, Components, form, Participation, Support
Customizing HTML Form Validation / / No Comments Form validation has always been my least favorite part of web development. You need to duplicate validation on both client and server sides, handle loads of events, and worry about form element styling. To aid form validation, the HTML spec added some new form attributes like required and pattern to act as very basic validation. Did you know, however, that you can control native form validation using JavaScript? validity Each form element (input, for example) provides a validity property which represents a ValidityState. ValidityState looks something like this: // input.validity { badInput: false, customError: true, patternMismatch: false, rangeOverflow: false, rangeUnderflow: false,... more → Posted in: JavaScript Tagged with: Customizing, form, HTML, Validation
Vest, a New Javascript Form Validation Framework – InfoQ.com / / No Comments Vest, a New Javascript Form Validation Framework InfoQ.com “JavaScript” – Google News… more → Posted in: JavaScript Tagged with: form, framework, InfoQ.com, JavaScript, Validation, Vest
Explore all of Google Maps in Lego form with this Web app – The Next Web / / No Comments The Next Web Explore all of Google Maps in Lego form with this Web appThe Next WebMany kids have built plastic brick cities out of Lego, but what if you could see any location on Google Maps in Lego form? That's what designer Einer Öberg has done with the appropriately named Brick Street View. The Web app renders Street View …and more » map app – Google News… more → Posted in: Interactive Maps Tagged with: Explore, form, Google, Lego, maps, Next, this