Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 04 Fields

Fieldset

A titled group of fields inside a longer form. Screen readers read the legend as they enter the group, so a field called Street is heard as part of the delivery address.

Use it in Angular
import { FieldsetComponent } from '@okaapi-ui/angular';
// An attribute on a native fieldset: <fieldset ui-fieldset legend="…">

An address

Delivery address

Where the driver should go.

Angular
<fieldset ui-fieldset legend="Delivery address" hint="Where the driver should go.">
  <ui-text-field label="Street" autocomplete="address-line1" formControlName="street" />
  <ui-text-field label="City" autocomplete="address-level2" formControlName="city" />
</fieldset>

In Arabic

عنوان التوصيل
Angular
<fieldset ui-fieldset legend="عنوان التوصيل">…</fieldset>

When to use something else

If you needUse
A frame around content that is not a formCard
One choice from a few, with a group labelRadio group

Inputs

NameTypeDefaultWhat it does
legendstring — Required. The group title.
hintstring — A line under the legend, read with the group.
disabledboolean — The native attribute: disables every field inside.

Keyboard and screen readers

  • The legend is read when focus enters the group, so each field is heard as part of it.