Skip to content

Typed keys

Sonenta extends the notion of a key. Beyond its path (flat or nested), each key carries a type that describes its role in the interface. The type is an axis in its own right, distinct from structure: a checkout.pay key (nested path) can be of type button.

A key's type informs three things:

  • Translation: the type provides context. A button is translated short and in the imperative, a heading is nominal, an error_message stays clear and actionable.
  • Accessibility: the type decides which accessibility surfaces the key carries. A button calls for an aria_label, an image for an alt_text, a text / heading / label for plain_language and screen_reader.
  • Tooling: the agents and the dashboard adapt their recommendations to the type.

Sonenta defines 17 types. The default type is text.

TypeUsage
textrunning text (default)
headingheading
labelfield or element label
captioncaption
badgepill / short tag
tooltiptooltip
error_messageerror message
toastephemeral notification
buttonbutton
linklink
menu_itemmenu entry
input_placeholderfield placeholder text
input_labelinput field label
imageimage
iconicon
meta_titlemetadata title (SEO)
meta_descriptionmetadata description (SEO)

The type describes a key's role. The structure (flat or nested path) describes how you organize it. The two are independent: you freely choose the nesting, and each key keeps its type. For the structural axis, see Key nesting.

Assign a type to each key, manually in the dashboard or via the agents' recommendation. Without an explicit type, a key is text. The type is carried by the key, in the content layer, and follows the key everywhere (translation, surfaces, CDN).