%ents; ]>
Simple Buttons This specification provides a way to send simple buttons. &LEGALNOTICE; xxxx ProtoXEP Standards Track Standards XMPP Core NOT_YET_ASSIGNED Kim Alvefur zash@zash.se zash@zash.se 0.0.2 2018-09-30 ka Polishing preparing for submission 0.0.1 2018-09-02 ka Initial version

Having actionable buttons in chats is apparently a fashionable thing now. This specification defines a simple protocol for buttons and responses.

  • Is "button" too UI-centric?
    • Could base it on the <action> element from ad-hoc?
  • Styling? Maybe a few fixed styles like normal, warning, danger?

OPTIONAL.

Button
An actionable object that can be invoked.
Click
The act of invoking the actionable object.

A chat bot wants to provide fixed choice answers or commands.

A button is represented by a <button> element in the urn:xmpp:tmp:buttons.

]]>
value
Textual payload to be sent in a message <body> when the button is clicked.
<label>
Text label for the button. Can be repeated per language.

A message with buttons is sent by including one or more <button> elements with distinct value attributes. At least one <label> element MUST be included containing a textual description for the button.

Approve? (yes/no) ]]>

A single message MUST NOT have multiple buttons with the same @value.

When the user clicks a button, their client sends a plain text message body containing the @value as <body> text.

yes ]]>

OPTIONAL. TODO.

OPTIONAL. TODO.

Accessibility for whom?

Multiple instances of the <label/> element MAY be included for the purpose of providing alternate versions of the same text in different languages, i.e. with distinct xml:lang attributes.

Do not press the big red button marked "Danger: Do Not Push".

None.

Register the namespace etc.

REQUIRED for protocol specifications.