Section header
A section header, nol-section-header: the label of a group of rows in a list or tree, in the label size at the emphasis weight, with no fill or line. Groups are separated by space: every header that is not the first element in its container stands 0.75rem below what comes before it. It has the heading role. A collapsible header holds one button, the whole header, whose caret after the label points down while the group is open and turns to the end while it is closed; the owner holds the open state and shows or removes the rows.
Examples
Loading…
States
Loading…
API
Selector nol-section-header
Import from @noldova/ui.components.angular
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
label | string | Required | The header's text, its required |
level | number | SectionHeaderResources.sectionHeaderLevel | The heading level screen readers announce, its |
icon | string | null | The Material Symbols name of an icon shown before the label, such as |
collapsible | boolean | false | Whether the person can fold the group, its |
uppercase | boolean | false | Whether the label shows as an uppercase group heading, its |
controls | string | null | The id of the element holding the group's rows, which a collapsible header's button controls, its |
expanded | boolean | true | Whether a collapsible header's group is open, its two-way Two-way: bind it as |
Accessibility
| Key | Action |
|---|---|
| Enter | On a collapsible header, folds its group, or opens it again. |
| Space | On a collapsible header, folds its group, or opens it again. |
It has the heading role, at level 3 unless its owner gives another level.
Its icon is hidden from assistive technology, so the label alone names the heading; an uppercase header only looks so, and is read as its owner writes it.
A collapsible header holds one button, exposing whether its group is open and, when its owner names it, the region it controls; its caret is hidden from assistive technology.
A header that isn't collapsible takes no focus. The owner holds the open state and shows or removes the rows.
Specification
Loading…