Typed keys
The concept
Section titled “The concept”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
buttonis translated short and in the imperative, aheadingis nominal, anerror_messagestays clear and actionable. - Accessibility: the type decides which accessibility surfaces the key carries. A
buttoncalls for anaria_label, animagefor analt_text, atext/heading/labelforplain_languageandscreen_reader. - Tooling: the agents and the dashboard adapt their recommendations to the type.
The key types
Section titled “The key types”Sonenta defines 17 types. The default type is text.
| Type | Usage |
|---|---|
text | running text (default) |
heading | heading |
label | field or element label |
caption | caption |
badge | pill / short tag |
tooltip | tooltip |
error_message | error message |
toast | ephemeral notification |
button | button |
link | link |
menu_item | menu entry |
input_placeholder | field placeholder text |
input_label | input field label |
image | image |
icon | icon |
meta_title | metadata title (SEO) |
meta_description | metadata description (SEO) |
Type and structure: two distinct axes
Section titled “Type and structure: two distinct axes”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.
Configuration
Section titled “Configuration”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).