Articles, page 3
How to build the parts of an interface in plain HTML, CSS and JavaScript, accessible from the start, worked through with the code of Tray UI.
Accessible tooltips that pass WCAG 1.4.13
A tooltip in plain HTML and JavaScript that meets WCAG 1.4.13: hoverable, dismissible with Escape, persistent, tied to its control, and what to use instead.
Testing colour contrast in every theme
Test WCAG colour contrast in every theme automatically: rules for token pairs measured in Node, then the text of real pages measured on its ground in a browser.
A checkout page in HTML and CSS
A checkout page in plain HTML and CSS: the steps, an address the browser can fill, delivery as radios, card fields, and a total that is read aloud.
prefers-reduced-motion beyond animation
What prefers-reduced-motion should change besides keyframe animations: presses, turning chevrons, filling bars, a folding sidebar and overlays that fade.
A custom select that says its value
A custom select in HTML and JavaScript whose button says its label and its value, the keys of its list, and when the native select element is the better choice.
Accessible charts: keyboard, key and table
A chart in HTML that everyone can read: a name and a summary, a key that does not rest on colour, the figures as a table, arrow keys and colours at 3:1.
Why an npm ES module breaks in Node
Node and webpack refuse a relative import with no file extension, and esbuild does not: the rule, how to reproduce it, and a build step that fixes the package.
Segmented control with a sliding pill in CSS
A segmented control on radio inputs, with a pill that slides to the choice in CSS or a little script, and stays still for reduced motion and forced colours.
A settings page in plain HTML and CSS
How to build a settings page: sections beside their cards, switches that save at once or a form with a Save button, a danger zone, and what a phone changes.
Tag input: chips, a limit and spoken errors
A tag input in plain HTML and JavaScript: chips with a remove button, Backspace, a limit, repeats, and errors marked on the text field and said aloud.
CSS prefers-contrast: more, one grey step up
Answer prefers-contrast: more in CSS by moving each grey token one step towards the ink and giving fills an edge, then test it in DevTools and Playwright.
44px touch targets without bigger buttons
Give a small button a 44 pixel hit area with a positioned ::before, see what WCAG 2.5.8 and 2.5.5 ask, and measure the area with elementFromPoint.
Articles 26 to 37 of 50
New articles in a feed
Add the Atom feed to a feed reader, and each new article comes to you whole, with its code.