~/talk

Accessible by law! Generating colors with JS and CSS Custom Properties

Talkat Nordic.js 2018 · on Sunday, 2018-10-07· [accessibility, web-platform]
slides:none on file

Norway requires accessible websites and the concrete requirement is WCAG contrast ratios (4.5:1 for normal text). The implementation uses the npm package color plus a sprinkle of JavaScript to compute luminance, rotate HSL for secondary hues, and expose results as CSS Custom Properties so styles read vars not hardcoded colors. A React theme component generates primary/secondary variants, flips text to black or white, adds a conditional border for very light backgrounds, and runs live in a demo.

AI-written summary · about

  1. 0:00Introduction
  2. 4:57The problem
  3. 6:55The solution
  4. 9:43Secondary colors
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.