~/talk

Button vs Div: What's the Big Deal Anyway?

Talkat React Summit Remote Edition 2020 · on Friday, 2020-04-17· [accessibility, web-platform]
slides:none on file

Live demo converts a native button into a div and back, showing exactly what is missing: browsers assume the first button is a submit so role="button" + tabindex + key handlers are often needed to make a div activate with Enter/Space, and dozens of CSS tweaks replicate button defaults — box-sizing includes padding; default button padding is seven pixels; borders use outset styling; some iOS builds need a pointer hint. Conclusion: platform elements require far less code than recreating them; wai-aria provides patterns for complex widgets.

AI-written summary · about

  1. 0:00Start
  2. 1:59Convert Your Div into a Button
  3. 4:23Box Sizing
  4. 8:45What Are the Reasons Why Someone like the React Native Web Team Would Want To Use a Div as a Button the
~/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.