What the guidance says

  • Buttons perform actions. Toggles manage two opposing states. Text fields collect short text values.
  • Keep one or two actions prominent in a view and never style a destructive action as the default choice.
  • Use visible labels because placeholder text disappears during entry.
  • Do not rely on color alone to communicate a toggle, selection, error, or disabled state.

How to apply it on the web

  • Use button, input, textarea, select, and field grouping elements before custom roles.
  • Connect labels, hints, errors, and required state in the accessibility tree.
  • Choose input type and completion attributes that fit the expected data.
  • Validate near the field and keep entered values when submission fails.

What to check

  • Does each control type match the decision or action it represents?
  • Does every input retain an understandable label after entry begins?
  • Are error messages specific, associated with the field, and announced?
  • Are destructive, default, loading, and disabled states distinct?

Official sources