• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4251 shaares
1 / 3
Filters
44 results tagged forms

Inclusively Hiding & Styling Checkboxes and Radio Buttons

QRCode

When you hide an interactive element, make sure you choose a hiding technique that keeps it screen reader-accessible, position it on top of whatever is visually replacing it so that a user navigating by touch can find it where they expect to, and then make it transparent.

https://www.sarasoueidan.com/blog/inclusively-hiding-and-styling-checkboxes-and-radio-buttons/
February 27, 2025 at 3:50:11 PM EST *
checkbox css accessibility webdesign forms
FILLER

Beautiful focus outlines · Medienbäcker Thomas Günther

QRCode

Here’s my starting point for custom focus outlines:

*:focus-visible {
outline-color: currentColor;
outline-style: solid;
outline-offset: .25rem;
outline-width: .25rem;
}

https://medienbaecker.com/articles/focus-outlines
January 2, 2025 at 11:02:30 AM EST *
forms webdesign accessibility buttons
FILLER

An HTML element id is a global variable

QRCode

Little relatively unknown fact, if you have an id attribute on an element, you can reference it in this way:

<button id="yo">…</button>
yo.onclick = ...

Furthermore, child elements with a name attribute can be referenced in this way:

<form id="x"> 
  <input name="em"> 
</form>
x.em.onclick = ...
https://flaviocopes.com/an-html-element-id-is-a-global-variable/
October 7, 2024 at 3:36:27 PM EDT *
javascript webdesign forms css
FILLER

CSS Button Styles You Might Not Know | David Bushell

QRCode

Visual Focus

Accessibility is for everyone. I like using keyboard navigation to tab through interactive elements. Sadly I’ve lost count of how many clients have asked me to “remove that ugly border” around focused buttons.

Button focus state can be improved with two tricks:

.button {
  &:focus-visible {
    outline: 2px solid magenta;
    outline-offset: 2px;
  }
}

First, I replace the default focus pseudo-class with focus-visible. MDN has a long section on focus vs focus-visible. Basically it’s what the original should have been in hindsight.

https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible#focus_vs_focus-visible

Second, I use outline-offset to give some breathing room between the focus ring and the button itself. If the button has a prominent border style the outline would sit flush against it looking like a double border. Adding an offset makes the focus state more visible.

One thing to note is that ::file-selector-button does not get focus, rather the parent input does, so apply styles there.

https://dbushell.com/2024/03/10/css-button-styles-you-might-not-know/
March 18, 2024 at 1:43:14 PM EDT *
buttons forms accessibility webdesign
FILLER

Designing better target sizes

QRCode

An interactive guide on designing better target sizes on the web.

https://ishadeed.com/article/target-size/
March 18, 2024 at 1:34:56 PM EDT *
buttons forms accessibility webdesign
FILLER

Design-Pattern Guidelines: Study Guide

QRCode

Unsure how to design and implement user-interface patterns? Use this collection of links to our content about specific patterns.

  • A Note on Interface Guidelines
  • Input Controls
  • Forms and Wizards
  • Tooltips, Dialogs, Instructional Overlay
  • Icons and Indicators
  • Menu Design
  • Site Navigation Elements
  • In-Page Navigation
  • Search
  • Errors
  • Privacy and Ethics
https://www.nngroup.com/articles/design-pattern-guidelines/
March 11, 2024 at 3:12:28 PM EDT *
webdesign designsystem forms ux
FILLER

The hidden depths of the input element - HTMHell

QRCode

Less typing is always better
Last but not least, my absolute favourite <input> attribute is the autocomplete attribute.

For controlling the available virtual keyboards use inputmode. To control whether an <input> can be updated, but also still read and submitted, choose readonly over disabled. You can trigger the camera on mobile devices using capture. Use the spellcheck attribtue to control whether spellchecking is activated on an input, and remember to set it to "false" on sensitive inputs. Save users time by using autocapitalize to control the capitalisation of text in an input. And finally, use autocomplete to help the browser fill in the contents of an input and save your users typing.

https://www.htmhell.dev/adventcalendar/2023/8/
January 12, 2024 at 8:52:13 AM EST *
forms webdesign
FILLER

html - Valid to use <a> (anchor tag) without href attribute? (buttons) - Stack Overflow

QRCode

The real question is whether the <a> element alone is an appropriate representation of a <button>. On a semantic level, there is a distinct difference between a link and a button.

A button is something that when clicked causes an action to occur.

A link is a button that causes a change in navigation in the current document. The navigation that occurs could be moving within the document in the case of fragment identifiers (#foo) or moving to a new document in the case of urls (/bar).

If you're concerned about the semantics and accessibility of using an <a> element (or <span>, or <div>) as a button, you should add the following attributes:

<a role="button" tabindex="0" ...>...</a>
https://stackoverflow.com/questions/10510191/valid-to-use-a-anchor-tag-without-href-attribute
May 16, 2023 at 10:04:12 AM EDT *
html webdesign forms
FILLER

Boilerform

QRCode

Boilerform is a little HTML and CSS boilerplate to take the pain away from working with forms.

https://boilerform.hankchizljaw.com/
April 11, 2023 at 11:14:41 AM EDT *
forms css webdesign boilerplate
FILLER

3 useful CSS hacks | Kevin Powell

QRCode

border-radius: 100vmax;

.full-width {
box-shadow: 0 0 0 100vmax var( --color );
clip-path: inset( 0 -100vmax );
}

https://www.youtube.com/watch?v=MywezIxlp8Y
March 18, 2023 at 11:01:42 AM EDT *
css webdesign forms buttons
FILLER

UX Design Challenges | UX Tools

QRCode

A set of real-world challenges to practice crucial UX design skills. Train yourself in product design and take away portfolio-worthy deliverables.

https://uxtools.co/challenges
September 21, 2022 at 10:17:16 AM EDT *
ux webdesign design forms accessibility
FILLER

accent-color - CSS: Cascading Style Sheets | MDN

QRCode

The accent-color CSS property sets the accent color for user-interface controls generated by some elements.

https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color
May 6, 2022 at 1:04:44 PM EDT *
forms webdesign css
FILLER

Best Practices to Reduce Cognitive Effort on Checkout Forms

QRCode

Filling out a form can frustrate anyone if it requires a high cognitive effort. A high cognitive effort causes users to think and work harder, increasing the time to complete the task. This experience can lead to page abandonment and lower conversion rates on a checkout form. To prevent this, apply these best practices to […]

https://uxmovement.com/forms/best-practices-to-reduce-cognitive-effort-on-checkout-forms/
April 15, 2022 at 8:34:40 AM EDT *
forms webdesign
FILLER

22 CSS Libraries For Website Design | by Niemvuilaptrinh | Dec, 2021 | Medium

QRCode

Normalize.css is a library that helps you build all elements more consistently when displayed in today’s popular browsers. I hope that the article will provide you with useful CSS libraries for web…

https://philipwalton.github.io/solved-by-flexbox/
https://tobiasahlin.com/spinkit/
https://connoratherton.com/loaders
https://github.com/AllThingsSmitty/css-protips
https://csslayout.io/close-button/
https://bansal.io/pattern-css
https://github.com/codrops/PageTransitions
https://lokesh-coder.github.io/pretty-checkbox/#basic-checkbox

https://niemvuilaptrinh.medium.com/22-css-libraries-for-website-design-2c06d3a2ba26
January 24, 2022 at 9:47:45 AM EST *
css webdesign forms
FILLER

Form design: from zero to hero all in one blog post – Adam Silver – Designer, London, UK.

QRCode

90 percent of the problems found in forms solved in a few hundred precious words.

  • Use sentence case for labels, hints and error messages. It’s easier to read and spot nouns. Use a verb for button text because the user is doing something.

  • Be tolerant of mistakes like extra spaces, dashes and slashes. Do the hard work so users don’t have to.

  • Prefix the word “Error:” to the document’s title. It’s the first thing announced by screen readers when the page loads.

  • Tell users what they need and how long the form will take to complete before they start.

https://adamsilver.io/blog/form-design-from-zero-to-hero-all-in-one-blog-post/
December 30, 2021 at 9:59:04 AM EST *
webdesign forms
FILLER

Pure CSS Custom Styled Radio Buttons | Modern CSS Solutions

QRCode

Learn to create custom, cross-browser, theme-able, scalable radio buttons in pure CSS and ensuring styles remain accessible across states.

Also checkboxes:
https://moderncss.dev/pure-css-custom-checkbox-style/

https://www.sarasoueidan.com/blog/inclusively-hiding-and-styling-checkboxes-and-radio-buttons/

https://moderncss.dev/pure-css-custom-styled-radio-buttons/
October 29, 2021 at 11:36:14 AM EDT *
checkbox forms buttons webdesign
FILLER

Centering checkboxes with multi-line labels

QRCode

Checkboxes are the worst
But I'm here to help make them better.

Here's an approach I use to always perfectly center them with the first line of text, no matter the text length or size

https://codepen.io/adamwathan/pen/bGNxMpz?editors=1000
September 29, 2021 at 10:09:33 AM EDT *
webdesign forms checkbox
FILLER

Why the GOV.UK Design System team changed the input type for numbers - Technology in government

QRCode

We take a look at why the GOV.UK Design System changed the element it uses for inputting numbers, making it more accessible and easier to use.

Using <input type="text" inputmode="numeric" pattern="[0-9]*"> allows for a degree of separation between how the user enters data (“input mode”), what the browser expects the user input to contain (type equals number), and potentially how it tries to validate it.

https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/
September 17, 2021 at 1:31:57 PM EDT *
forms webdesign mobile
FILLER

How To Use Help Elements To Improve Your Designs — Smashing Magazine

QRCode

When designing a website, the most important thing is to make it as usable and convenient as possible. On a website on which users could possibly get confused, it is best to include help elements. Help elements come in all different shapes and sizes: an entire page, a suggestion box or a quick tip. But they all have one thing in common: besides doing the obvious (i.e. helping the user), help elements provide an extra convenience that brings the website closer to that sought-after usability.

https://www.smashingmagazine.com/2009/04/help-elements-design-showcase/
May 28, 2021 at 7:29:28 PM EDT *
webdesign design forms
FILLER

Checkboxes make excellent buttons | Christian Heilmann

QRCode

I like to use checkboxes as buttons. And here’s how.

A checkbox is a binary state. It is checked or not. So instead of reading out the state in an event handler, I tend to read the checked property.

https://christianheilmann.com/2020/09/24/checkboxes-make-excellent-buttons/
October 5, 2020 at 11:52:06 AM EDT *
checkbox forms webdesign
FILLER
1 / 3
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community