Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…

Read the release notes

autocapitalize

Hints how virtual keyboards and voice input capitalize typed text: none, sentences, words or characters. Set it on a field or on its form.

Overview

The autocapitalize attribute tells virtual keyboards and voice input how to capitalize what the user enters: not at all, the first letter of each sentence, the first letter of each word, or every letter. Typing on a physical keyboard is not affected. It is a hint: it never changes or validates the value that is submitted.

Applies to: <input> (not email, url or password, which never capitalize), <textarea>, elements with contenteditable, and <form>, where it sets the default for the form's controls.

Values

ValueMeaningTypical fields
none or offNo automatic capitals.Usernames, codes, handles
sentences or onCapitalize the first letter of each sentence.Comments, descriptions, messages
wordsCapitalize the first letter of each word.Names, titles, city names
charactersCapitalize every letter.Booking references, licence plates, postcodes in some countries
Absent, "" or an unknown valueDefault state: the control uses its form's value if the form has one, otherwise the browser's default (Chrome and Safari capitalize sentences; Firefox does not capitalize).—

Inheritance: a control's own value wins. Only a control in the default state picks up its form owner's autocapitalize. Ordinary ancestors (a <section>, a <fieldset>) are not consulted.

Examples

Codes typed in capitals

characters turns on Shift for every letter, but the user can still type lowercase, and a paste or a physical keyboard ignores the hint. Accept both cases in pattern and normalise on the server.

A whole form without capitals

Set the value once on the form. Fields that need something else override it.

Editable regions

In Vanilla Breeze

  • No styles depend on it, and VB does not add it to authored fields.
  • <site-search> sets autocapitalize="off", autocorrect="off" and spellcheck="false" on the search input it builds (src/web-components/site-search/logic.js).
  • Pair it with VB's form contract. Put fields in <form-field> and explain any expected format in an <output class="hint">; the hint is wired to aria-describedby for you.

Accessibility

  • Fewer key presses. The right value saves toggling Shift on a touch keyboard, which helps people with limited dexterity.
  • No effect on screen readers. The field is announced the same way.
  • Do not rely on it for correctness. If case matters, say so in the label or hint and accept either case where you can.

Browser support

Not Baseline (checked 2026-11): Chrome 43, Edge 79, Firefox 111 and Safari on iOS 10.3 support it. Desktop Safari does not, which matters little because physical keyboards ignore the hint anyway.

Gotchas

  • Keyboard apps decide. Third-party keyboards can ignore the hint or treat values differently.
  • email, url and password inputs never capitalize, whatever you set.
  • Browser defaults differ when the attribute is absent. Set it explicitly on fields where capitals would be wrong.

Related

Which to choose

  • autocapitalize — changes the keyboard's Shift state while typing.
  • pattern — enforces the format when the form is submitted.
  • Server-side normalisation — the only way to guarantee the stored case.
↑