@tanrei/mcp 0.1.0-next.0 → 0.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +4 -5
- package/README.md +21 -6
- package/bin/tanrei-mcp.js +3 -3
- package/dist/server.js +2218 -711
- package/dist/vocabulary/docs/governance/mimicry-gaps.json +95 -21
- package/dist/vocabulary/packages/tokens-build/generated/component-catalog.json +1825 -0
- package/dist/vocabulary/specs/accordion.spec.json +1 -0
- package/dist/vocabulary/specs/app-bar.spec.json +1 -0
- package/dist/vocabulary/specs/app-shell.spec.json +1 -0
- package/dist/vocabulary/specs/avatar.spec.json +1 -0
- package/dist/vocabulary/specs/badge.spec.json +1 -0
- package/dist/vocabulary/specs/bottom-sheet.spec.json +1 -0
- package/dist/vocabulary/specs/breadcrumbs.spec.json +1 -0
- package/dist/vocabulary/specs/button-group.spec.json +1 -0
- package/dist/vocabulary/specs/button-with-menu.spec.json +1 -0
- package/dist/vocabulary/specs/button.spec.json +1 -0
- package/dist/vocabulary/specs/calendar.spec.json +1 -0
- package/dist/vocabulary/specs/callout.spec.json +1 -0
- package/dist/vocabulary/specs/card.spec.json +1 -0
- package/dist/vocabulary/specs/carousel.spec.json +1 -0
- package/dist/vocabulary/specs/chat-composer.spec.json +1 -0
- package/dist/vocabulary/specs/checkbox-group.spec.json +1 -0
- package/dist/vocabulary/specs/checkbox.spec.json +1 -0
- package/dist/vocabulary/specs/chip-field.spec.json +1 -0
- package/dist/vocabulary/specs/chip.spec.json +1 -0
- package/dist/vocabulary/specs/code-block.spec.json +1 -0
- package/dist/vocabulary/specs/color-field.spec.json +1 -0
- package/dist/vocabulary/specs/color-input.spec.json +1 -0
- package/dist/vocabulary/specs/combobox-field.spec.json +1 -0
- package/dist/vocabulary/specs/combobox.spec.json +1 -0
- package/dist/vocabulary/specs/component.schema.json +1 -0
- package/dist/vocabulary/specs/copy-button.spec.json +1 -0
- package/dist/vocabulary/specs/date-time-picker.spec.json +1 -0
- package/dist/vocabulary/specs/description-list.spec.json +1 -0
- package/dist/vocabulary/specs/dialog.spec.json +1 -0
- package/dist/vocabulary/specs/divider.spec.json +1 -0
- package/dist/vocabulary/specs/drop-zone.spec.json +1 -0
- package/dist/vocabulary/specs/embedded-text-input.spec.json +1 -0
- package/dist/vocabulary/specs/empty-state.spec.json +1 -0
- package/dist/vocabulary/specs/fab-menu.spec.json +1 -0
- package/dist/vocabulary/specs/field-group.spec.json +1 -0
- package/dist/vocabulary/specs/field.spec.json +1 -0
- package/dist/vocabulary/specs/figure.spec.json +1 -0
- package/dist/vocabulary/specs/file-item.spec.json +1 -0
- package/dist/vocabulary/specs/file-picker.spec.json +1 -0
- package/dist/vocabulary/specs/file-upload.spec.json +1 -0
- package/dist/vocabulary/specs/handle.spec.json +1 -0
- package/dist/vocabulary/specs/image-preview.spec.json +1 -0
- package/dist/vocabulary/specs/inline-code.spec.json +1 -0
- package/dist/vocabulary/specs/inventory.json +1 -0
- package/dist/vocabulary/specs/keyboard-shortcut.spec.json +1 -0
- package/dist/vocabulary/specs/link-card.spec.json +1 -0
- package/dist/vocabulary/specs/link.spec.json +1 -0
- package/dist/vocabulary/specs/list-row.spec.json +1 -0
- package/dist/vocabulary/specs/list.spec.json +1 -0
- package/dist/vocabulary/specs/loading-indicator.spec.json +1 -0
- package/dist/vocabulary/specs/main-action-button.spec.json +1 -0
- package/dist/vocabulary/specs/marquee-text.spec.json +1 -0
- package/dist/vocabulary/specs/menu.spec.json +1 -0
- package/dist/vocabulary/specs/menubar.spec.json +1 -0
- package/dist/vocabulary/specs/meter.spec.json +1 -0
- package/dist/vocabulary/specs/modal-layer.spec.json +1 -0
- package/dist/vocabulary/specs/navigation-bar.spec.json +1 -0
- package/dist/vocabulary/specs/navigation-drawer.spec.json +1 -0
- package/dist/vocabulary/specs/number-field.spec.json +1 -0
- package/dist/vocabulary/specs/number-input.spec.json +1 -0
- package/dist/vocabulary/specs/number-ticker.spec.json +1 -0
- package/dist/vocabulary/specs/one-time-code-field.spec.json +1 -0
- package/dist/vocabulary/specs/one-time-code-input.spec.json +1 -0
- package/dist/vocabulary/specs/page-header.spec.json +1 -0
- package/dist/vocabulary/specs/pagination.spec.json +1 -0
- package/dist/vocabulary/specs/popover.spec.json +1 -0
- package/dist/vocabulary/specs/previous-next-links.spec.json +1 -0
- package/dist/vocabulary/specs/progress-indicator.spec.json +1 -0
- package/dist/vocabulary/specs/prose.spec.json +1 -0
- package/dist/vocabulary/specs/radio-button.spec.json +1 -0
- package/dist/vocabulary/specs/radio-group.spec.json +1 -0
- package/dist/vocabulary/specs/rating.spec.json +1 -0
- package/dist/vocabulary/specs/resizable-frame.spec.json +1 -0
- package/dist/vocabulary/specs/scroll-area.spec.json +1 -0
- package/dist/vocabulary/specs/search.spec.json +1 -0
- package/dist/vocabulary/specs/segmented-button.spec.json +1 -0
- package/dist/vocabulary/specs/select-field.spec.json +1 -0
- package/dist/vocabulary/specs/select.spec.json +1 -0
- package/dist/vocabulary/specs/side-sheet.spec.json +1 -0
- package/dist/vocabulary/specs/size-transition.spec.json +1 -0
- package/dist/vocabulary/specs/skeleton.spec.json +1 -0
- package/dist/vocabulary/specs/slider-field.spec.json +1 -0
- package/dist/vocabulary/specs/slider.spec.json +1 -0
- package/dist/vocabulary/specs/snackbar.spec.json +1 -0
- package/dist/vocabulary/specs/split-view.spec.json +1 -0
- package/dist/vocabulary/specs/stepper.spec.json +1 -0
- package/dist/vocabulary/specs/steps.spec.json +1 -0
- package/dist/vocabulary/specs/swatch.spec.json +1 -0
- package/dist/vocabulary/specs/switch.spec.json +1 -0
- package/dist/vocabulary/specs/tab-view.spec.json +1 -0
- package/dist/vocabulary/specs/table-of-contents.spec.json +1 -0
- package/dist/vocabulary/specs/table.spec.json +1 -0
- package/dist/vocabulary/specs/tabs.spec.json +1 -0
- package/dist/vocabulary/specs/tag-group.spec.json +1 -0
- package/dist/vocabulary/specs/tag.spec.json +1 -0
- package/dist/vocabulary/specs/text-field.spec.json +1 -0
- package/dist/vocabulary/specs/text-input.spec.json +1 -0
- package/dist/vocabulary/specs/timeline.spec.json +1 -0
- package/dist/vocabulary/specs/toolbar.spec.json +1 -0
- package/dist/vocabulary/specs/tooltip.spec.json +1 -0
- package/dist/vocabulary/specs/tree-view.spec.json +1 -0
- package/dist/vocabulary/tanrei.config.json +2 -1
- package/dist/vocabulary/tokens/comp/accordion.tokens.json +70 -47
- package/dist/vocabulary/tokens/comp/app-bar.tokens.json +99 -2
- package/dist/vocabulary/tokens/comp/app-shell.tokens.json +1 -1
- package/dist/vocabulary/tokens/comp/avatar.tokens.json +17 -5
- package/dist/vocabulary/tokens/comp/badge.tokens.json +2 -1
- package/dist/vocabulary/tokens/comp/bottom-sheet.tokens.json +143 -73
- package/dist/vocabulary/tokens/comp/breadcrumbs.tokens.json +3 -3
- package/dist/vocabulary/tokens/comp/button-group.tokens.json +26 -4
- package/dist/vocabulary/tokens/comp/button-with-menu.tokens.json +256 -28
- package/dist/vocabulary/tokens/comp/button.tokens.json +275 -22
- package/dist/vocabulary/tokens/comp/calendar.tokens.json +28 -18
- package/dist/vocabulary/tokens/comp/callout.tokens.json +55 -299
- package/dist/vocabulary/tokens/comp/card.tokens.json +3 -3
- package/dist/vocabulary/tokens/comp/carousel.tokens.json +70 -10
- package/dist/vocabulary/tokens/comp/chat-composer.tokens.json +37 -3
- package/dist/vocabulary/tokens/comp/checkbox.tokens.json +18 -22
- package/dist/vocabulary/tokens/comp/chip.tokens.json +67 -16
- package/dist/vocabulary/tokens/comp/code-block.tokens.json +15 -1
- package/dist/vocabulary/tokens/comp/combobox.tokens.json +202 -33
- package/dist/vocabulary/tokens/comp/copy-button.tokens.json +19 -2
- package/dist/vocabulary/tokens/comp/date-time-picker.tokens.json +66 -35
- package/dist/vocabulary/tokens/comp/description-list.tokens.json +45 -23
- package/dist/vocabulary/tokens/comp/dialog.tokens.json +95 -35
- package/dist/vocabulary/tokens/comp/drop-zone.tokens.json +151 -0
- package/dist/vocabulary/tokens/comp/embedded-text-input.tokens.json +2 -2
- package/dist/vocabulary/tokens/comp/field-group.tokens.json +21 -1
- package/dist/vocabulary/tokens/comp/field.tokens.json +33 -4
- package/dist/vocabulary/tokens/comp/figure.tokens.json +56 -2
- package/dist/vocabulary/tokens/comp/file-item.tokens.json +4 -4
- package/dist/vocabulary/tokens/comp/file-picker.tokens.json +3 -3
- package/dist/vocabulary/tokens/comp/file-upload.tokens.json +2 -7
- package/dist/vocabulary/tokens/comp/handle.tokens.json +343 -0
- package/dist/vocabulary/tokens/comp/image-preview.tokens.json +53 -23
- package/dist/vocabulary/tokens/comp/input-box.tokens.json +161 -26
- package/dist/vocabulary/tokens/comp/keyboard-shortcut.tokens.json +5 -3
- package/dist/vocabulary/tokens/comp/link-card.tokens.json +24 -4
- package/dist/vocabulary/tokens/comp/link.tokens.json +3 -3
- package/dist/vocabulary/tokens/comp/list-row.tokens.json +249 -0
- package/dist/vocabulary/tokens/comp/list.tokens.json +106 -225
- package/dist/vocabulary/tokens/comp/loading-indicator.tokens.json +13 -3
- package/dist/vocabulary/tokens/comp/main-action-button.tokens.json +96 -23
- package/dist/vocabulary/tokens/comp/marquee-text.tokens.json +110 -0
- package/dist/vocabulary/tokens/comp/menu.tokens.json +248 -43
- package/dist/vocabulary/tokens/comp/menubar.tokens.json +63 -12
- package/dist/vocabulary/tokens/comp/meter.tokens.json +173 -0
- package/dist/vocabulary/tokens/comp/modal-layer.tokens.json +69 -0
- package/dist/vocabulary/tokens/comp/navigation-bar.tokens.json +5 -36
- package/dist/vocabulary/tokens/comp/navigation-drawer.tokens.json +478 -122
- package/dist/vocabulary/tokens/comp/number-input.tokens.json +2 -2
- package/dist/vocabulary/tokens/comp/number-ticker.tokens.json +77 -0
- package/dist/vocabulary/tokens/comp/one-time-code-input.tokens.json +22 -7
- package/dist/vocabulary/tokens/comp/pagination.tokens.json +118 -79
- package/dist/vocabulary/tokens/comp/popover.tokens.json +84 -13
- package/dist/vocabulary/tokens/comp/previous-next-links.tokens.json +194 -0
- package/dist/vocabulary/tokens/comp/progress-indicator.tokens.json +14 -4
- package/dist/vocabulary/tokens/comp/prose.tokens.json +16 -0
- package/dist/vocabulary/tokens/comp/radio-button.tokens.json +16 -20
- package/dist/vocabulary/tokens/comp/rating.tokens.json +230 -0
- package/dist/vocabulary/tokens/comp/resizable-frame.tokens.json +166 -0
- package/dist/vocabulary/tokens/comp/scroll-area.tokens.json +99 -0
- package/dist/vocabulary/tokens/comp/search.tokens.json +144 -58
- package/dist/vocabulary/tokens/comp/segmented-button.tokens.json +75 -21
- package/dist/vocabulary/tokens/comp/select.tokens.json +168 -34
- package/dist/vocabulary/tokens/comp/side-sheet.tokens.json +60 -13
- package/dist/vocabulary/tokens/comp/size-transition.tokens.json +49 -0
- package/dist/vocabulary/tokens/comp/skeleton.tokens.json +5 -2
- package/dist/vocabulary/tokens/comp/slider.tokens.json +11 -10
- package/dist/vocabulary/tokens/comp/snackbar.tokens.json +81 -255
- package/dist/vocabulary/tokens/comp/split-view.tokens.json +52 -0
- package/dist/vocabulary/tokens/comp/stepper.tokens.json +538 -0
- package/dist/vocabulary/tokens/comp/swatch.tokens.json +208 -0
- package/dist/vocabulary/tokens/comp/switch.tokens.json +19 -18
- package/dist/vocabulary/tokens/comp/tab-view.tokens.json +5 -5
- package/dist/vocabulary/tokens/comp/table-of-contents.tokens.json +58 -33
- package/dist/vocabulary/tokens/comp/table.tokens.json +141 -30
- package/dist/vocabulary/tokens/comp/tabs.tokens.json +132 -44
- package/dist/vocabulary/tokens/comp/tag-group.tokens.json +15 -4
- package/dist/vocabulary/tokens/comp/tag.tokens.json +32 -8
- package/dist/vocabulary/tokens/comp/text-input.tokens.json +18 -88
- package/dist/vocabulary/tokens/comp/timeline.tokens.json +15 -19
- package/dist/vocabulary/tokens/comp/toolbar.tokens.json +121 -6
- package/dist/vocabulary/tokens/comp/tooltip.tokens.json +8 -32
- package/dist/vocabulary/tokens/comp/tree-view.tokens.json +136 -51
- package/dist/vocabulary/tokens/dial/dial.tokens.json +23 -3
- package/dist/vocabulary/tokens/fidelity/cupertino.fidelity.json +165 -0
- package/dist/vocabulary/tokens/fidelity/m3-like.fidelity.json +215 -5
- package/dist/vocabulary/tokens/fidelity/reference/androidx-material3.json +144 -0
- package/dist/vocabulary/tokens/fidelity/reference/apple-hig.json +196 -0
- package/dist/vocabulary/tokens/generated/cupertino/components.json +1749 -0
- package/dist/vocabulary/tokens/generated/cupertino/fidelity.json +162 -0
- package/dist/vocabulary/tokens/generated/m3-like/components.json +1761 -0
- package/dist/vocabulary/tokens/generated/m3-like/fidelity.json +182 -12
- package/dist/vocabulary/tokens/generated/tanrei/components.json +1764 -0
- package/dist/vocabulary/tokens/icon-sets/material-symbols.icon-set.json +2 -1
- package/dist/vocabulary/tokens/schema/system.schema.json +324 -35
- package/dist/vocabulary/tokens/sys/behavior.tokens.json +66 -1
- package/dist/vocabulary/tokens/sys/measure.tokens.json +105 -21
- package/dist/vocabulary/tokens/sys/motion.tokens.json +474 -2
- package/dist/vocabulary/tokens/sys/scroll-edge.tokens.json +50 -0
- package/dist/vocabulary/tokens/sys/shape.tokens.json +1 -1
- package/dist/vocabulary/tokens/sys/state.tokens.json +16 -3
- package/dist/vocabulary/tokens/sys/typescale.tokens.json +5 -5
- package/dist/vocabulary/tokens/systems/core.system.json +1889 -0
- package/dist/vocabulary/tokens/systems/cupertino.system.json +298 -79
- package/dist/vocabulary/tokens/{comp → systems/m3-like/comp}/fab-menu.tokens.json +5 -15
- package/dist/vocabulary/tokens/systems/m3-like.system.json +451 -125
- package/dist/vocabulary/tokens/systems/tanrei.system.json +619 -321
- package/dist/vocabulary/tokens/tanrei.resolver.json +48 -6
- package/package.json +22 -6
- package/dist/vocabulary/tokens/AGENTS.md +0 -15
- package/dist/vocabulary/tokens/comp/navigation-rail.tokens.json +0 -254
- package/dist/vocabulary/tokens/fidelity/m3-expressive-like.fidelity.json +0 -68
- package/dist/vocabulary/tokens/fidelity/reference/androidx-material3-buttons.json +0 -67
- package/dist/vocabulary/tokens/generated/m3-expressive-like/fidelity.json +0 -99
- package/dist/vocabulary/tokens/systems/m3-expressive-like.system.json +0 -83
- package/dist/vocabulary/tokens/vocabulary.lock.json +0 -7052
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"accordion","title":"Accordion","summary":"Content that a row shows and hides in place: one item is a single disclosure, several are a set whose items open by themselves or one at a time; each header is a button with a label, an optional glyph, second line and short value, and a chevron that turns; as rows on the surface or bounded by one hairline, ruled by a line or parted by a gap, with room for reading or drawn closer among controls.","level":"base","listing":"default","anatomy":[{"id":"accordion","description":"The column that holds the items. It draws nothing of its own in the plain look and adds no space around the items; in the outlined look with a line between the items it carries the one edge around them all. It has no role and no name."},{"id":"item","description":"One header and the content it shows and hides (an item of the item kind). Open or closed by itself; in the outlined look with a gap between the items it carries an edge of its own."},{"id":"container","description":"An item's header: the row across the item's width that opens and closes it. One button. It carries hover, focus and press and is the hit area; it has no fill at rest in the default system."},{"id":"icon","description":"A glyph of the system's icon set at the start of the header, by name. Decorative, and the same open and closed.","optional":true},{"id":"label","description":"The item's name and the header's accessible name. Plain text unless the product gives a heading; it wraps and is never cut."},{"id":"supporting-text","description":"A line under the label that says what the item holds, quieter than the label. It wraps.","optional":true},{"id":"trailing-text","description":"A short value before the chevron, readable without opening the item: a count, the present value of what the item holds. One line.","optional":true},{"id":"chevron","description":"The icon set's expand_more at the end of the header, turned half a turn while the item is open: the only mark of open and closed. Hidden from assistive technology, which is given the state in words."},{"id":"content","description":"What the item shows while open, under its header and inset to the header's first part: the product's content, from one sentence to fields, a table or another accordion. Not drawn, not focusable and not exposed while the item is closed, and still part of the document where the platform has one."},{"id":"outline","description":"The outlined look's edge: one hairline with rounded corners around the whole accordion, or around each item where the items are parted by a gap.","optional":true},{"id":"divider","description":"A hairline across the accordion between two items, where the items are ruled by a line.","optional":true},{"id":"focus-ring","description":"Gap-then-ring indicator shown for keyboard focus of a header, drawn inside the header's row."}],"props":[{"name":"variant","type":"enum","values":["plain","outlined"],"default":"plain","description":"How the accordion stands on its surface. plain: rows on the surface, with nothing around them; for content in the flow of a page or a panel. outlined: bounded by one hairline with rounded corners; for a set that should read as one block among others, and on a surface where rows alone would be lost. A design system may add values.","axis":"tanrei.comp.accordion.variant"},{"name":"size","type":"enum","values":["small","medium"],"default":"medium","description":"How much room a header takes, in a list's and a tree view's words: its least height, its paddings, its text styles, its glyphs and the space under an open item's content. medium (a header at the control height, 36 in the default system, with a 16 label: as tall as a navigation drawer's row and the Buttons beside the accordion) is for a page a person reads: the questions of a help page, the sections of a long form. small (a 36 header with a 14 label, a small navigation drawer row's, held at the minimum target) is for a panel among controls: settings, an inspector, a card. Its heights follow the system's height ladder at either size. While it is not set the accordion is drawn at the size its nearest container sets (ACC-37), and at medium where none does. A design system may add values.","axis":"tanrei.comp.accordion.size"},{"name":"separation","type":"enum","values":["auto","divider","gap"],"default":"auto","description":"How an item is told from the item next to it. divider: one hairline between them; in the outlined look the items share one edge. gap: empty space and no line; in the outlined look each item has an edge of its own. Auto takes comp.accordion.separation, the design system's answer (divider in the default system)."},{"name":"exclusive","type":"boolean","default":false,"description":"Whether opening an item closes the one that was open, so that at most one item of this accordion is open. False, the default, lets every item open and close by itself: a reader may compare two answers, and nothing moves that they did not touch. True is for items that exclude each other (the steps of one choice). An open item can always be closed again, leaving none open."}],"items":[{"name":"item","summary":"One header and the content it shows and hides. The fixture's content is the text of its content.","props":[{"name":"label","type":"string","default":"","description":"Its name, drawn in its header and used as the header's accessible name. Plain text, never a heading; the label slot takes its place where the product needs a heading of its own level or inline content. Required unless the label slot is filled."},{"name":"supportingText","type":"string","default":"","description":"A line under the label that says what the item holds (\"Email, push and the weekly digest\"), read as the header's description. Empty draws the label alone."},{"name":"trailingText","type":"string","default":"","description":"A short value before the chevron that can be read without opening the item: a count, the present value. One line; read after the supporting text as the header's description."},{"name":"icon","type":"string","default":"","description":"The name of a glyph in the system's icon set, drawn at the start of the header. Decorative."},{"name":"open","type":"boolean","default":false,"description":"Whether its content is shown under its header. Set by the product for an item that starts open; the web sets it itself when the user opens or closes the item, and a controlled platform leaves it to the caller."},{"name":"disabled","type":"boolean","default":false,"description":"Makes its header unavailable: it keeps its place and its open, draws its disabled look, cannot be toggled and leaves the focus order. The content of an open disabled item stays shown and as usable as the product made it."}],"slots":[{"name":"label","description":"The product's own label content in place of the label prop: text with inline content (a code span, a tag), or a heading of the level the page's outline needs. The accordion draws it in the label's style and changes neither its role nor its level. No control."},{"name":"default","description":"The content: text, or the product's own blocks (paragraphs, fields, a table, any component, another accordion). The accordion insets it and gives it no style."}],"events":[{"name":"toggle","description":"The item opened or closed: by the user from its header, by the accordion closing it for another (exclusive), or by the platform's search finding text in it; carries its new open state. Emitted exactly once per change, when the change begins."}]}],"states":["enabled","disabled","hovered","focused","pressed"],"behavior":[{"id":"ACC-1","text":"THE accordion SHALL lay out its items in one column, in the order given, each as wide as the accordion, and the accordion as wide as the layout it is placed in gives it: in a page, in a card, in a dialog, in a panel and in another item's content alike, with its start edge on the start edge of what is around it. It SHALL bring no outer space of its own (PRS-15: the space between it and its neighbours is its container's), SHALL have no minimum width, no maximum width and no height of its own, and SHALL NOT scroll: it is as tall as its headers and its open content, and content that cannot shrink scrolls inside its own box. An accordion of one item is a single disclosure and SHALL differ in nothing from an item of a set."},{"id":"ACC-2","text":"THE accordion SHALL draw each item as a header and, WHILE the item is open, its content below the header (ACC-8). A header is one row across the item's whole width, at least as high as its size gives (comp.accordion.container.height.medium for medium and comp.accordion.container.height.small for small) and growing with its text, padded at its start and end by comp.accordion.container.padding-inline.medium for medium and comp.accordion.container.padding-inline.small for small and above its first line and below its last by comp.accordion.container.padding-block.medium for medium and comp.accordion.container.padding-block.small for small. Inside it SHALL lay out, from the start: the icon, where the item has one (ACC-5); the text, a column that takes the remaining width and holds the label (ACC-3) and under it the supporting text (ACC-4); the trailing text, where it has one (ACC-4); and the chevron (ACC-6); with comp.accordion.container.gap between each two of them. THE accordion SHALL centre the icon, the trailing text and the chevron on the label's first line and keep them there however tall the text grows, and any height a header has beyond its text SHALL be shared equally above and below it."},{"id":"ACC-3","text":"THE accordion SHALL draw an item's label in the text style of its size (comp.accordion.label.typescale.medium for medium and comp.accordion.label.typescale.small for small) and the label color of its variant (comp.accordion.plain.label.color for plain, comp.accordion.outlined.label.color for outlined); the label SHALL wrap and SHALL never be cut. WHERE the item's label slot holds content THE accordion SHALL draw that content in the label's place, style and color instead of the label, and SHALL change neither its role nor its level: a label given as text is plain text and never a heading, and a label the product gives as a heading stays a heading of the level the product gave it, drawn as every other label is. The label slot SHALL hold text, inline content or a heading and no control: IF it holds a link, a button or a field THE accordion SHALL still render it and in debug builds report that a header is one button and holds no other. THE accordion SHALL set the label's letter-spacing by the script of its text, as every title is set (PRS-20): no negative letter-spacing WHERE its language is Chinese, Japanese or Korean, and none WHERE its script joins its letters or stacks marks on them."},{"id":"ACC-4","text":"WHILE an item's supportingText is not empty THE accordion SHALL draw it under the label, in the text style of its size (comp.accordion.supporting-text.typescale.medium for medium and comp.accordion.supporting-text.typescale.small for small) and the supporting-text color of its variant (comp.accordion.plain.supporting-text.color, comp.accordion.outlined.supporting-text.color); it SHALL wrap and SHALL never be cut, and the header SHALL grow to hold it. WHILE an item's trailingText is not empty THE accordion SHALL draw it on one line between the text and the chevron, in the text style of its size (comp.accordion.trailing-text.typescale.medium for medium and comp.accordion.trailing-text.typescale.small for small) and the trailing-text color of its variant (comp.accordion.plain.trailing-text.color, comp.accordion.outlined.trailing-text.color); it SHALL NOT wrap, and WHILE it would take more than half of the header's inner width it SHALL be cut at the end of its own direction with an ellipsis, so that the label always keeps at least half."},{"id":"ACC-5","text":"WHILE an item's icon is not empty THE accordion SHALL draw that glyph of the system's icon set at the start of the header, in a box of comp.accordion.icon.size.medium for medium and comp.accordion.icon.size.small for small, in the icon color of its variant (comp.accordion.plain.icon.color, comp.accordion.outlined.icon.color), with sys.icon.family.unselected and sys.icon.fill.unselected, sys.icon.weight and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max, and SHALL keep it from assistive technology. WHILE icon is empty THE accordion SHALL draw no glyph and keep no room for one: the label starts at the start padding. The icon SHALL be the same glyph whether the item is open or closed."},{"id":"ACC-6","text":"THE accordion SHALL draw a chevron at the end of every header: the icon set's expand_more in a box of comp.accordion.chevron.size.medium for medium and comp.accordion.chevron.size.small for small, in the chevron color of its variant (comp.accordion.plain.chevron.color, comp.accordion.outlined.chevron.color), drawn as ACC-5 draws a glyph, turned half a turn WHILE the item is open, and kept from assistive technology, which is given the item's state in words (ACC-24). The chevron SHALL be the only thing about a header that shows whether its item is open: the header's container, label, texts and icon SHALL be the same open and closed. A disabled item SHALL keep its chevron."},{"id":"ACC-7","text":"THE accordion SHALL draw an item's open as the state of that item alone: WHILE open is true its content is shown under its header, and WHILE open is false its content is not drawn, takes no space, cannot take focus and is not exposed to assistive technology. WHEN the accordion first appears it SHALL draw every item as its open says, in its first frame, without the motion of ACC-13 and without emitting toggle. A closed item's content SHALL stay what it was: on a platform that keeps what it does not draw (the web, where the content stays in the document, a field in it keeps its value and is still sent with its form) THE accordion SHALL NOT remove, rebuild or reset it when the item closes or opens; on a platform that builds only what is drawn, the content is built again when the item opens, and state that must outlive a close is the product's to hold."},{"id":"ACC-8","text":"WHILE an item is open THE accordion SHALL draw the content of its default slot under its header, inset at its start and end by the header's inline padding (comp.accordion.container.padding-inline.medium for medium and comp.accordion.container.padding-inline.small for small), so that it starts under the first part of the header, with no space above it and comp.accordion.content.padding-block-end.medium for medium and comp.accordion.content.padding-block-end.small for small below it. The content is the product's: THE accordion SHALL give it no text style and no color, which it takes from where the accordion stands, SHALL add no style to anything inside a component placed in it (PRS-16), and SHALL neither cut it nor limit its height. The content SHALL be held whole by the item: a margin of its first or last part is space inside the content, under the header and above the space below the content, and SHALL NOT reach out of the item. WHILE the item is open it is one target (ACC-36), and its hovered, focused and pressed states are the whole item's: THE accordion SHALL draw the container color of that state under the content as under the header (ACC-17) and SHALL give the content the state's opacity, and SHALL change nothing else about it — not its box, its text style or its color."},{"id":"ACC-9","text":"WHILE variant is plain THE accordion SHALL draw no edge and no fill of its own: its headers are rows on the surface it stands on, in the colors of the plain look (comp.accordion.plain.container.color and the plain tokens ACC-3 to ACC-6 name). WHILE variant is outlined THE accordion SHALL draw an edge comp.accordion.outline.width wide in comp.accordion.outline.color with corners comp.accordion.outline.shape, inside the size of what it bounds and without moving anything in it — around the whole accordion WHILE its separation is divider, and around each item WHILE it is gap (ACC-10) — SHALL clip the headers' containers, their state layers and the content to that edge's corners, and SHALL draw its headers in the colors of the outlined look (comp.accordion.outlined.container.color and the outlined tokens ACC-3 to ACC-6 name). The variant SHALL change the edge and these colors and nothing else."},{"id":"ACC-10","text":"THE accordion SHALL tell an item from the item next to it as its separation names: WHILE separation is auto, as comp.accordion.separation names, which follows sys.behavior.separation unless a design system sets it apart; WHILE separation is divider or gap, as that value names, whatever the tokens say. WHILE it is divider THE accordion SHALL draw one line of comp.accordion.divider.thickness in comp.accordion.divider.color across its whole width between every two items that follow each other, under the first one's content WHILE that item is open and under its header WHILE it is closed, without adding to an item's height, and SHALL draw no line above the first item or below the last. WHILE it is gap it SHALL leave comp.accordion.item.gap of empty space between every two items that follow each other, SHALL draw no such line, and SHALL leave no such space above the first item or below the last. WHEN separation, or the token it follows, changes THE accordion SHALL draw the other form at once, without animation, keeping every item's open; WHEN separation names a value the accordion does not define it SHALL treat it as auto and in debug builds report the unknown value. A platform that cannot draw a choice SHALL fall back to the first value, divider, and state that in its README."},{"id":"ACC-11","text":"WHEN the user activates the header of an item that is not disabled by pointer, touch, Enter or Space THE accordion SHALL emit that item's toggle exactly once with its new open state, and on the web SHALL set the item's open itself (a controlled platform leaves it to the caller). WHEN focus is on the header of a closed item and the user presses the arrow key toward the end of the line (Right in a left-to-right layout) THE accordion SHALL open the item in the same way, and on the header of an open item the arrow key toward the start SHALL close it; the arrow key that would do neither, and every other key, SHALL be left to the platform. THE accordion SHALL NOT move focus from one header to another by an arrow key: every header is a stop of its own in the focus order, as a navigation drawer's group rows are. Activating a header SHALL NOT move focus, and focus SHALL stay on the header while its item opens and closes."},{"id":"ACC-12","text":"WHILE exclusive is true THE accordion SHALL keep at most one of its own items open: WHEN an item opens, by the user's act, by the product setting its open or by ACC-16, THE accordion SHALL close the item that was open, emitting that item's toggle exactly once with false and on the web setting its open itself (a controlled platform leaves it to the caller), in the same motion as the one that opens (ACC-13). An open item SHALL still close by its own header, leaving none open. The items of an accordion placed inside an item's content SHALL NOT count: each accordion keeps its own. WHEN the accordion first appears, or exclusive becomes true, with more than one item open THE accordion SHALL draw the first of them in order open and the others closed, on the web setting their open itself, and in debug builds report that an exclusive accordion was given several open items. WHILE exclusive is false every item SHALL open and close by itself."},{"id":"ACC-13","text":"WHEN an item's open changes THE accordion SHALL reveal or hide its content from the header downward, the item growing or shrinking in height and everything after it moving with its lower edge, and SHALL turn the chevron, over comp.accordion.motion.disclosure-duration with comp.accordion.motion.disclosure-easing, at once where motion is reduced. The content SHALL be laid out once, at the width and height it has when shown, and the motion SHALL only change how much of it is seen: its lines SHALL NOT wrap again, its parts SHALL NOT be resized and nothing in it SHALL be measured again from frame to frame. The item's height SHALL go from its height at rest before the change to its height at rest after it with no jump at the start or at the end, whatever margins the content's first and last parts have. Content that is being hidden SHALL stay drawn until the motion ends and SHALL leave the focus order and assistive technology when the motion begins. WHEN open changes again before the motion ends THE accordion SHALL go on from where the motion is toward the new state, without a jump. toggle SHALL be emitted when the change begins, not when the motion ends."},{"id":"ACC-14","text":"WHEN items open and close in answer to the user's act on a header THE accordion SHALL keep that header where it is in the view, as far as the scrolling of what holds it allows, and move only what follows it: IF another item above it closes at the same time (ACC-12) THE accordion SHALL hold the activated header's place while the content above it goes, so that the row under the pointer or the finger does not move away from it. It SHALL NOT scroll for any other reason: an item that opens SHALL NOT be scrolled into view, and its content MAY reach below the view's edge."},{"id":"ACC-15","text":"WHEN an item closes while keyboard focus is inside its content THE accordion SHALL move focus to that item's header or, WHILE the item is disabled, leave focus to the platform's default; WHEN it closes while focus is elsewhere it SHALL NOT move focus."},{"id":"ACC-16","text":"WHERE the platform can search the text of what is shown and reports a match that lies in content it does not draw, or goes to a place inside such content (on the web, the browser's find-in-page and a link to a fragment of the page), WHEN the match or the place is inside a closed item THE accordion SHALL open that item, and every closed item of an accordion that holds it, at once and without the motion of ACC-13, SHALL emit each one's toggle exactly once with true, SHALL apply ACC-12 to each, and SHALL leave bringing the match into view to the platform; it SHALL do so for a disabled item too, whose header is unavailable and whose content is still part of the page. On a platform that has no such search or cannot report such a match, a closed item's content is not found, and THE accordion SHALL NOT open anything for it."},{"id":"ACC-17","text":"WHILE an item's header is hovered, keyboard-focused or pressed THE accordion SHALL render that header's container, label, supporting text, trailing text, icon, chevron and opacity from the component tokens of its variant in the highest-precedence active state, with precedence pressed over focused over hovered; focus gained by pointer or touch SHALL NOT select the focused state. Hover and press over any part of the header's row SHALL answer on the whole container. WHILE the item is open THE accordion SHALL draw these states on the whole item, which is one target (ACC-36): the item's container — under the header and the content, to the item's edges — takes the state's container color and the header's parts its colors, whether the pointer is over the header or over the content where a press would close the item (ACC-36); over a descendant of the content that takes a press itself, the item SHALL show no hovered state of its own. The edge and the lines SHALL NOT change under a pointer, a press or focus."},{"id":"ACC-18","text":"WHEN an item's header receives keyboard focus THE accordion SHALL show the focus ring inside the header's container, following comp.accordion.container.shape, while the item is closed, and WHILE it is open around the whole item, which is one target (ACC-36) — inside the item's edge, around the header and the content together, following the item's corners (the outlined look's at the set's corners, none elsewhere) — so that neither a neighbouring item, an outlined edge nor a scrolling ancestor cuts it, without animation; focus gained by pointer or touch SHALL NOT show it."},{"id":"ACC-19","text":"WHERE a header is lower than the minimum target THE accordion SHALL make its container at least sys.target.touch tall for touch input and sys.target.pointer tall for fine pointers, because rows that touch cannot extend a hit area over each other; a platform that cannot tell the input type SHALL use sys.target.touch. The whole row, from the item's start edge to its end edge, its paddings, icon, texts and chevron included, SHALL be the header's hit area; WHILE the item is open, its content, down to the item's lower edge, SHALL be part of the item's hit area too: the open item is one target, as ACC-36 says."},{"id":"ACC-20","text":"WHILE an item's disabled is true THE accordion SHALL render its header's container, label, supporting text, trailing text, icon, chevron and opacity from the disabled component tokens of its variant, SHALL NOT emit its toggle for a press, a key or a touch, SHALL NOT make its header focusable and SHALL expose the header as disabled. The item SHALL keep its place and its open: a disabled item that is open still shows its content, which stays as usable as the product made it, and the product MAY still set its open. A header that draws no fill at rest SHALL draw none while disabled."},{"id":"ACC-21","text":"WHEN an item's header is pressed by pointer, touch, Enter or Space THE accordion SHALL show its pressed state without delay and SHALL keep it visible for at least sys.motion.duration.press-hold, even when the press ends sooner."},{"id":"ACC-22","text":"WHILE an item's header is pressed THE accordion SHALL answer as sys.behavior.pressed-feedback names: overlay applies the pressed tokens to the whole container at once; ripple grows the pressed state layer, clipped to the container, from the point of contact (from the center for keyboard activation); dim applies the pressed opacity to the whole header and draws no state layer; none draws no answer to the press. Under ripple and dim only the container color stays with the state under the press; label, supporting text, trailing text, icon, chevron and opacity still come from the pressed tokens. Under none every part stays with the state under the press. WHILE the item is open the press is the whole item's (ACC-36), by its header or its content: overlay paints the pressed container color on the whole item, ripple grows the layer over the whole item from the point of contact (from the item's center for a key), and the pressed opacity applies to the content as to the header. The ripple grows over comp.accordion.motion.feedback-duration with comp.accordion.motion.state-easing, fades over comp.accordion.motion.state-duration with comp.accordion.motion.state-easing once the press has ended and press-hold has passed, and appears whole where motion is reduced."},{"id":"ACC-23","text":"THE accordion SHALL ease its headers' container corners and the outlined look's corners by sys.shape.corner-smoothing (0 is a quarter circle, 0.6 the iOS continuous corner; a platform with only the OS curve draws it for any amount above 0) and show a header's keyboard focus as sys.behavior.focus-style names (ring or glow), around the header while its item is closed and around the whole item while it is open (ACC-18); a platform that cannot draw a choice SHALL fall back to the first value and state that in its README."},{"id":"ACC-24","text":"THE accordion SHALL expose each item's header as one button named by its label (the text of the label slot's content where the product gave one), described by its supporting text and then its trailing text, with its expanded or collapsed state, the disabled state where it applies, and its icon and chevron hidden; and SHALL expose an open item's content after its header in reading order, as the content it is. On the web the header is the summary of a details element, which the browser exposes as a button with the expanded state; on Apple platforms a button whose value is expanded or collapsed, as a disclosure group reads; on Android the expanded state with the expand and collapse actions; in Flutter the expanded semantics flag; in React Native accessibilityState.expanded. THE accordion SHALL NOT make an item's content a landmark or a named region, and the accordion itself SHALL have no role and no name: a page with several items would otherwise list each of them among its regions. WHILE an item's label is empty and its label slot holds nothing THE accordion SHALL still render it, and in debug builds report that its header has no accessible name."},{"id":"ACC-25","text":"WHEN an item opens or closes THE accordion SHALL let the header's changed state be the only thing assistive technology is told: it SHALL announce nothing itself, SHALL have no live region, and SHALL NOT move keyboard or screen-reader focus into the content."},{"id":"ACC-26","text":"WHILE the text size is enlarged THE accordion SHALL grow its label, its supporting text and its trailing text with it, keep its paddings and gaps, wrap the label and the supporting text, and grow each header in height; it SHALL keep the icon's and the chevron's boxes at their token sizes, both still centred on the label's first line (ACC-2), SHALL cut nothing but a trailing text as ACC-4 says, SHALL set no fixed height, SHALL lose no content when the reader raises line height, paragraph spacing, letter spacing or word spacing, and SHALL need no horizontal scrolling at a width of 320 points with text at 200 %."},{"id":"ACC-27","text":"WHERE the platform draws with a person's own forced colors (the web's forced-colors mode, and a platform's equivalent where it has one) THE accordion SHALL draw the outlined look's edge and the lines of ACC-10 in the platform's text color; its labels, texts, icons and chevrons in that text color; a disabled header in the platform's color for disabled text; and a header's hover, press and focus in the platform's own colors for a button and for focus, with the focus ring still inside the header. Open and closed SHALL still be told apart by the chevron's turn, which no color carries."},{"id":"ACC-28","text":"WHERE the layout direction is right-to-left THE accordion SHALL mirror the order of a header's parts and apply its paddings by logical start and end: the icon at the right, the text after it, the trailing text and the chevron at the left; the content SHALL be inset by the same paddings. The arrow keys of ACC-11 SHALL follow the direction: Left opens and Right closes. The chevron's half turn SHALL be the same in both directions: a glyph that points down and then up has no mirrored form. A ripple SHALL still grow from the point of contact."},{"id":"ACC-29","text":"THE accordion SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the accordion is shown THE accordion SHALL draw itself for the new direction at once, without a motion of its own, keeping every item's open and its focus."},{"id":"ACC-30","text":"WHERE the layout direction is right-to-left THE accordion SHALL draw an item's icon mirrored left to right exactly when the system's icon set marks that glyph's name as mirrored or the product forces mirroring for that use, and unmirrored when the product forbids it: the icon helper mirrors the glyph inside its own box, about the box's vertical centre line, changing neither its place, size and color nor the order ACC-28 gives. THE accordion SHALL NOT mirror a glyph itself, and SHALL NOT mirror content the product gives as an image or a view of its own rather than by a glyph's name. The chevron (expand_more, ACC-6) is not marked and is never mirrored."},{"id":"ACC-31","text":"THE accordion SHALL lay out an item's label, its supporting text and its trailing text each as text of its own direction, isolated from the text around it: each takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right name, a number with its unit and a version keep their own order in a right-to-left layout and reorder nothing beside them; THE accordion SHALL still place each and align its lines by the layout direction, not by the text's own, and SHALL cut a trailing text that does not fit (ACC-4) at the end of its own direction."},{"id":"ACC-32","text":"WHERE an item's content holds another accordion THE accordion SHALL treat it as content like any other: the inner accordion is laid out inside the item's inset (ACC-8), which is what shows its depth; it has its own variant, size, separation and exclusive, and the outer accordion passes it no size (ACC-37); its headers answer the keys of ACC-11 for its own items only; and WHEN the outer item closes and opens again the inner items SHALL be as their open said. IF accordions nest more than three levels deep THE accordion SHALL still render them, and in debug builds report the depth."},{"id":"ACC-33","text":"WHILE the system's icon set cannot yet draw a glyph of the accordion (its font is still loading) THE accordion SHALL draw nothing in that glyph's place, never the glyph's name as text, SHALL keep the glyph's box, and SHALL draw the glyph once the set can; a header SHALL open and close its item all the same."},{"id":"ACC-34","text":"WHEN variant, or the size the accordion draws (ACC-37), names a value that the active design system does not have THE accordion SHALL render with the default value (the default variant's or size's tokens), and in debug builds report the unknown value; a variant or a size a design system added SHALL be drawn from its tokens, as the core values are."},{"id":"ACC-35","text":"IF the accordion has no items THE accordion SHALL draw nothing, take no space and expose nothing. IF an item has no content THE accordion SHALL still render its header, which opens onto nothing but the space under the content (ACC-8), and in debug builds report that the item shows and hides nothing."},{"id":"ACC-36","text":"WHEN the content of an open item is pressed and released with the primary mouse button, a touch or a pen, without the pointer moving further than the platform's touch slop between the two, THE accordion SHALL close that item exactly as a press on its header does: one toggle with false, the motion of ACC-13 and the header kept where it is as ACC-14 says, with exclusive (ACC-12) closing nothing else. The item's whole frame is its hit area while it is open: the content from the item's start edge to its end edge and down to its lower edge, the space under the content (ACC-8) included, the way a whole card answers a press while the controls inside it keep their own. THE accordion SHALL NOT close the item IF the press lands on or inside something that answers a press itself — a link, a button, a field, a select, a label, a summary, an editable element, an element with a tab index, an element with a widget role, a custom element that takes focus, or an element to which the product gave the pointer cursor where the item's own is not (the pointer the item shows for itself does not count) — which keeps its own behaviour; IF the release ends a text selection, that is, the selection is not empty and lies in the item once the press is released; IF the pointer moved further than the slop (a drag, a scroll); IF a modifier key (Control, Command, Shift, Alt or Option) is held or a button other than the primary is used; IF the press is the second or a later press of a multiple click; WHILE the item is disabled (ACC-20); or IF the press lands inside an item of an accordion nested in the content: such a press belongs to the innermost item, so a press in a nested open item's content closes that item only, and a nested header toggles its own item only. For a pointer the open item is one target, as a whole clickable card is, and not a header and a content styled alike: WHILE a fine pointer is over the item where a press would toggle or close it — its header, or its content outside a descendant that takes a press itself — THE accordion SHALL show the hovered state on the whole item (ACC-17) and the pointer cursor; a press SHALL show the pressed state on the whole item (ACC-21, ACC-22); keyboard focus on the header SHALL be shown around the whole item (ACC-18). WHILE the pointer is over a descendant that takes a press itself, that descendant SHALL keep its own cursor, hover and press, and the item SHALL show neither its hovered state nor the pointer cursor. The content SHALL get no role, no name, no focus stop and no announcement: the header stays the one button with the expanded state, and the keyboard and assistive technology reach the item through it alone (ACC-11, ACC-24). WHERE the platform's content answers no press (on the web, without the element's script) the content SHALL show neither the pointer cursor nor a state."},{"id":"ACC-37","text":"WHILE size is set THE accordion SHALL draw every header, and the space under every open item's content, at its own size, whatever a container sets; without its script it SHALL draw that size all the same. WHILE size is not set and a container around the accordion sets a size for what it holds — the nearest such container where several do — THE accordion SHALL draw at that size, its heights following the system's height ladder as at a size of its own, and at its nearest size where it has none of that name, in the order extra-small, small, medium, large, extra-large, the larger of two as near; WHILE no container around it sets one it SHALL draw medium. A container whose size is not set SHALL pass none, and the accordion SHALL pass none to what its items hold: their content is the product's (ACC-8), and an accordion nested in it takes the size of the containers around both (ACC-32). WHEN the size it draws changes — its own size set, changed or removed, a container's size set, changed or removed, or the accordion moved into or out of such a container — THE accordion SHALL draw the new size at once, without a motion, keeping every item's open and focus."},{"id":"ACC-38","text":"WHEN the control height (dial.control.height) is N THE accordion's default header SHALL be N tall: a header of a medium accordion SHALL be drawn at comp.accordion.container.height.medium, which is sys.control.height.medium held at sys.target.minimum, and of a small accordion at comp.accordion.container.height.small, the small step; the header's block padding SHALL give up half of what its height loses below the control height's reference, so that one line of its label still fits, and the pointer and touch targets SHALL still hold a header up where they are taller (ACC-19)."}],"accessibility":{"role":"button","keyboard":[{"keys":"Tab / Shift+Tab","action":"Moves focus to each header that is not disabled, in order, and through the focusable content of each open item after its header. Every header is its own stop; the accordion is not one."},{"keys":"Enter or Space","action":"On a header, opens or closes its item. Focus stays on the header."},{"keys":"Right arrow / Left arrow (mirrored in right-to-left layouts)","action":"On the header of a closed item, the arrow toward the end of the line opens it; on the header of an open item, the arrow toward the start closes it. Elsewhere the keys are the platform's. As on a navigation drawer's group row."},{"keys":"Up arrow / Down arrow / Home / End","action":"Nothing of the accordion's: they scroll the page as they do anywhere. Focus does not rove between headers."}],"labeling":"Each header is a button named by its label (or by the text of the label slot's content), described by its supporting text and then its trailing text, with the expanded or collapsed state; its icon and chevron are hidden. A label given as text is plain text; a heading in the label slot keeps its level. An open item's content follows its header in reading order and has no role or name of its own. The accordion has no role and no name.","minimumTarget":true,"notes":["An accordion is a set of disclosures, not a tree and not tabs: a header is a button with an expanded state that shows or hides what follows it, and every header stays its own tab stop. This is the model of a navigation drawer's groups, on purpose: a group in a drawer and an item in content answer the same keys in the same way, and a person learns it once. One tab stop with roving arrow keys would make a long page of content behave like a single widget and take the arrow keys from the page.","WCAG 1.3.1 (info and relationships): the accordion does not decide whether a label is a heading. Most labels are names of a fold in a panel and should stay text. Where the items are the sections of a page that people navigate by heading (the questions of a help page), the product gives a heading of the right level in the label slot. Some assistive technology reads a heading inside a button as the button's name only; where the outline must not depend on that, the product puts the heading before a single-item accordion instead.","The content is not a region. Naming every item's content as a landmark fills the list of regions with entries a person did not ask for; six items make six regions. A product whose single disclosure is a main part of its page may give its own content element the region role and the label's name.","Closed content costs a press to read and cannot be seen at a glance. Do not close what most people need, do not hide a form's required fields or its errors in a closed item, and when a form is refused, open the item that holds the first error before moving focus to the field: the accordion does not open an item because something inside it is invalid.","exclusive moves the page: opening one item closes another, and what the reader was looking at goes. The accordion keeps the activated header where it is (ACC-14), which removes the worst of it; even so, keep exclusive for items that exclude each other. A person who wants two answers side by side cannot have them.","Where the platform's own search can reach closed content (the web's find-in-page), a match opens the item (ACC-16), so closing content does not hide it from someone who looks for its words. Native platforms have no such search: there, text in a closed item is found only by the product's own search, which sets the item's open.","A header holds no control (ACC-3). A switch, a menu button or a link beside the label would be a control inside a button: unreachable or ambiguous for assistive technology, and a press on it would also toggle the item. An action that belongs to an item goes into its content, or beside the accordion.","WCAG 2.5.8 (target size): a header is the whole row and at least the touch target high at both sizes; rows that touch do not share or extend hit areas (ACC-19).","WCAG 2.1.1 (keyboard) and 4.1.2 (name, role, value): closing an item by a press on its open content (ACC-36) is a convenience for a pointer only. The header is the one control, reached by the keyboard and named with its expanded state; the content gains no role, no focus stop and no announcement, so nothing is offered to a pointer that the keyboard and assistive technology do not already have through the header. An open item is one target, as a whole clickable card is (the maintainers' decision, 2026-10-13): the region that answers a press is the region that looks it — the pointer cursor over it, the hovered and pressed states drawn on the whole item, and keyboard focus ringed around the whole item, so that hover, press and focus all show the same one target, never a header and a content styled alike. This follows the clickable-card practice: the whole card is the target's area while the controls inside it keep their own press (Bootstrap, \"Stretched link\"), and the pointer cursor is set by the script, since without it the style would deceive (Inclusive Components, \"Cards\") — without the script the content shows no pointer and no state. Where the pointer is over a control in the content, that control is the target: it keeps its own cursor and states and the item shows none, as a nested button in a card answers alone. WCAG 2.4.7, 2.4.11 and 2.4.13 (focus visible, not obscured, appearance): the ring around an open item is the system's focus ring of the same widths and colors, inside the item's edge and drawn over its content, so nothing in the item, no neighbouring item, outlined edge or scrolling ancestor covers or cuts it, and it encloses a larger area than the header's. What a press must not be is kept from the same practice: a press that ends a text selection, or that is a drag, is not taken (that card pattern tells a selection by the press's length; the accordion tells it by the selection itself and by the slop).","WCAG 1.4.1 (use of color): open and closed are told by the chevron's turn and by the expanded state, never by color; the header keeps its colors when open. Disabled is told by the faded header and by the disabled state.","WCAG 1.4.3 and 1.4.11 (contrast) in the default system: the label is on-surface and the supporting text, trailing text, icon and chevron are on-surface-variant, on the surface the accordion stands on; each is held to 4.5:1 on every surface role by the token invariants. The edge and the lines are decorative: every header is told as a button by its chevron and its states.","Forced colors (ACC-27): the edge and the lines take the text color and the states the platform's own; nothing about open and closed rested on a color.","Web: the items are the product's own `<details>` elements with a `<summary>` each, in the document, inside `<tanrei-accordion>`. They open and close, keep their place in the tab order, are found by search in the page and are read, translated and printed as the page's content before any script runs and without it; what the script adds is listed in the platform notes. Before the element is defined, and without script, the stylesheet already draws the whole look, so nothing moves when the element is upgraded.","How a state looks is a value decision of the active design system; components read the state's tokens and never compute the effect themselves."]},"tokens":"comp.accordion","fixtures":[{"id":"plain","props":{},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"outlined","props":{"variant":"outlined"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"plain-divider","props":{"separation":"divider"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"plain-gap","props":{"separation":"gap"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"outlined-divider","props":{"variant":"outlined","separation":"divider"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"outlined-gap","props":{"variant":"outlined","separation":"gap"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"small","props":{"size":"small"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"small-outlined","props":{"size":"small","variant":"outlined"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"small-outlined-gap","props":{"size":"small","variant":"outlined","separation":"gap"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"all-closed","props":{},"items":[{"kind":"item","props":{"label":"What is a design token?"},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"all-open","props":{},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?","open":true},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?","open":true},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"single","props":{},"items":[{"kind":"item","props":{"label":"What is a design token?"},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."}]},{"id":"single-open","props":{},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."}]},{"id":"single-outlined","props":{"variant":"outlined"},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."}]},{"id":"exclusive","props":{"exclusive":true},"items":[{"kind":"item","props":{"label":"What is a design token?","open":true},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?"},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"exclusive-two-open","props":{"exclusive":true},"items":[{"kind":"item","props":{"label":"What is a design token?"},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?","open":true},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?","open":true},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"supporting-text","props":{},"items":[{"kind":"item","props":{"label":"Colors","supportingText":"Roles, palettes and the six schemes","open":true},"content":"Every color a component reads is a role. A role takes its value from a palette, in each scheme."},{"kind":"item","props":{"label":"Typefaces","supportingText":"One stack for text, one for code"},"content":"One stack for text, one for code."},{"kind":"item","props":{"label":"Shape","supportingText":"The corner scale and how much the corners are eased"},"content":"The corner scale and how much the corners are eased."}]},{"id":"trailing-text","props":{},"items":[{"kind":"item","props":{"label":"Colors","trailingText":"48 roles"},"content":"Roles, palettes and the six schemes."},{"kind":"item","props":{"label":"Typefaces","trailingText":"Inter","open":true},"content":"One stack for text, one for code."},{"kind":"item","props":{"label":"Shape","trailingText":"8 px"},"content":"The corner scale and how much the corners are eased."}]},{"id":"icon","props":{},"items":[{"kind":"item","props":{"label":"Colors","icon":"palette","open":true},"content":"Roles, palettes and the six schemes."},{"kind":"item","props":{"label":"Notifications","icon":"notifications"},"content":"Email, push and the weekly digest."},{"kind":"item","props":{"label":"Account","icon":"person"},"content":"Your name, your address and your password."}]},{"id":"all-parts","props":{"variant":"outlined"},"items":[{"kind":"item","props":{"label":"Colors","icon":"palette","supportingText":"Roles, palettes and the six schemes","trailingText":"48 roles","open":true},"content":"Roles, palettes and the six schemes."},{"kind":"item","props":{"label":"Notifications","icon":"notifications","supportingText":"Email, push and the weekly digest","trailingText":"On"},"content":"Email, push and the weekly digest."},{"kind":"item","props":{"label":"Language","icon":"language","supportingText":"The language of the interface, not of your content","trailingText":"English"},"content":"The language of the interface."}]},{"id":"all-parts-small","props":{"size":"small"},"items":[{"kind":"item","props":{"label":"Colors","icon":"palette","supportingText":"Roles, palettes and the six schemes","trailingText":"48 roles","open":true},"content":"Roles, palettes and the six schemes."},{"kind":"item","props":{"label":"Notifications","icon":"notifications","supportingText":"Email, push and the weekly digest","trailingText":"On"},"content":"Email, push and the weekly digest."}]},{"id":"disabled","props":{},"items":[{"kind":"item","props":{"label":"What is a design token?"},"content":"A named design decision: a color, a size, a duration. Components read tokens and never a literal value."},{"kind":"item","props":{"label":"Which platforms are covered?","disabled":true},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."},{"kind":"item","props":{"label":"How do I change the look?","disabled":true,"open":true},"content":"With a layer: a file that sets the dials and, where a product needs it, single tokens."}]},{"id":"disabled-outlined","props":{"variant":"outlined"},"items":[{"kind":"item","props":{"label":"Colors","icon":"palette","trailingText":"48 roles"},"content":"Roles, palettes and the six schemes."},{"kind":"item","props":{"label":"Typefaces","icon":"settings","trailingText":"Inter","disabled":true},"content":"One stack for text, one for code."}]},{"id":"long-label","props":{},"items":[{"kind":"item","props":{"label":"What happens to the components of a product that already ships when a design system changes the value of a token they read?","open":true},"content":"They follow it at the next build. A token is a name, and the product holds the name."},{"kind":"item","props":{"label":"Which platforms are covered?","trailingText":"Five platforms, one set of tokens and one set of specs for all of them"},"content":"Web Components, SwiftUI, Jetpack Compose, Flutter and React Native, from one set of tokens and specs."}]},{"id":"plain-rtl","props":{},"direction":"rtl","items":[{"kind":"item","props":{"label":"ما هو رمز التصميم؟","open":true},"content":"قرار تصميم له اسم: لون أو مقاس أو مدة."},{"kind":"item","props":{"label":"ما المنصات المشمولة؟"},"content":"خمس منصات من مجموعة واحدة من الرموز."},{"kind":"item","props":{"label":"كيف أغيّر المظهر؟"},"content":"بطبقة: ملف يضبط القيم."}]},{"id":"outlined-gap-rtl","props":{"variant":"outlined","separation":"gap"},"direction":"rtl","items":[{"kind":"item","props":{"label":"الألوان","trailingText":"48","open":true},"content":"الأدوار واللوحات والمخططات الستة."},{"kind":"item","props":{"label":"الخطوط","trailingText":"Inter"},"content":"خط للنص وخط للشيفرة."}]},{"id":"icon-rtl","props":{},"direction":"rtl","items":[{"kind":"item","props":{"label":"التالي","icon":"arrow_forward"},"content":"الخطوة التالية."},{"kind":"item","props":{"label":"الإعدادات","icon":"settings","open":true},"content":"إعدادات الواجهة."}]},{"id":"ltr-label-rtl","props":{},"direction":"rtl","items":[{"kind":"item","props":{"label":"Tanrei 0.1.0","trailingText":"2026-10-07","open":true},"content":"ملاحظات الإصدار."},{"kind":"item","props":{"label":"الإصدارات السابقة"},"content":"لا توجد إصدارات سابقة."}]},{"id":"docs-on-this-page","props":{"variant":"outlined","size":"small"},"items":[{"kind":"item","props":{"label":"On this page","trailingText":"Behaviour"},"content":"Overview. Anatomy. Behaviour. Accessibility. Tokens."}]},{"id":"docs-conflicts","props":{"size":"small"},"items":[{"kind":"item","props":{"label":"Conflicts on file","trailingText":"3"},"content":"Three traits of the original cannot be drawn yet. Each has an entry in the ledger."}]},{"id":"studio-folds","props":{"size":"small"},"items":[{"kind":"item","props":{"label":"Text","supportingText":"Body, labels and headings","trailingText":"Inter, Noto Sans JP","open":true},"content":"The font stack, in order."},{"kind":"item","props":{"label":"Code","supportingText":"Code blocks and inline code","trailingText":"Roboto Mono"},"content":"The font stack, in order."},{"kind":"item","props":{"label":"Inherited rules","trailingText":"12"},"content":"Twelve rules come from the layers below this one."}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-accordion","props":{"variant":"variant","size":"size","separation":"separation","exclusive":"exclusive"},"items":{"item":{"name":"details","props":{"label":"summary","supportingText":"data-supporting-text","trailingText":"data-trailing-text","icon":"tanrei-icon","open":"open","disabled":"aria-disabled"},"events":{"toggle":"toggle"},"notes":"A native `<details>` whose first child is its `<summary>`. The summary's content is the label (the label slot): text, inline content, or a heading (`<summary><h3>…</h3></summary>`, which HTML allows). Inside the summary, an element with `data-supporting-text` holds the supporting text and one with `data-trailing-text` the trailing text; a `.tanrei-icon` element first in the summary is the icon. `open` is the element's own attribute and property, and `toggle` its own event (not bubbling; `event.newState` is `open` or `closed`), which the browser also sends when the product changes `open` — a product that sets `open` itself tells its own changes by the state it set. A disabled item is written `<summary aria-disabled=\"true\" tabindex=\"-1\">`: the stylesheet draws it and takes the pointer from it, `tabindex` takes it from the focus order, and the script refuses what is left."}},"notes":"Form: `<tanrei-accordion>` is a custom element with **no shadow root**, around the product's own native `<details>` elements in the light DOM — `<tanrei-accordion variant=\"outlined\"><details open><summary>Colors</summary><p>…</p></details><details>…</details></tanrei-accordion>`. The browser's disclosure is kept whole: it opens and closes without script, a summary is focusable and answers Enter and Space, it is exposed with its expanded state, its closed content stays in the document, find-in-page and a fragment link open it where the browser does that for a details element (ACC-16; in a browser that does not, the script listens for `beforematch` and `hashchange` where they exist, and otherwise closed content is not found, as in every details element there), and `exclusive` is the `name` attribute, which the element writes on its own `<details>` children with a name of its own (a nested accordion gets another, ACC-12); markup that must be exclusive without script writes `name` itself. Everything drawn comes from one stylesheet, `@tanrei/web/accordion.css`, whose selectors start at `tanrei-accordion` and are wrapped in `:where()`; it styles the page before the element is defined and without script (an element that is not yet defined is still an element), and the element adopts the same sheet into the root it is connected to, so it also works inside another component's shadow root. Props are attributes of the wrapper: `variant`, `size`, `separation`, `exclusive`. The summary is a grid (icon, text, trailing text, chevron); the browser's own marker is removed (`list-style: none` and the `::-webkit-details-marker` rule) and the chevron is the summary's `::after` in the icon font (`expand_more`), rotated under `details[open]`. The content's inset is padding on the `<details>` with the summary pulled back out by a negative inline margin, so no wrapper is needed around the product's content. The stylesheet alone gives the default system's whole look and every state: hover, `:focus-visible` with the ring as an inset outline, `:active` with the press-hold as a delayed transition back, the disabled look from `summary[aria-disabled=\"true\"]`, forced colors, and the separation through a style query on the component token's custom property with the `separation` attribute over it. The content's box is the details element's own `::details-content`, a block formatting context (`display: flow-root`): the margins of the content's first and last parts stay inside it, at rest and at every height of the motion, so the height the motion starts and ends at is the height at rest (ACC-8, ACC-13). Motion (ACC-13) is CSS where the browser can move a height to `auto` (`::details-content` with `block-size` from 0 to `calc-size(auto, size)`, `overflow: clip`, and `content-visibility` transitioned discretely so that closing content stays drawn until the end); elsewhere the script measures the content's height once, before the first frame, and the stylesheet moves the box between 0 and that height; where the browser has no `::details-content` the item opens at once, and so it does where motion is reduced. The script reads layout from frame to frame only for an item turned back in the first half of its motion on the script's path, whose height goes on with no event to tell its end: it reads the item's height once a frame until it stands still. The package's script, where it is loaded, adds what a stylesheet cannot: the shared press primitive on the summary (ripple and dim, ACC-22), the arrow keys of ACC-11, the `name` of `exclusive`, holding the activated header's place where the browser's scroll anchoring does not (ACC-14), moving focus to the summary when an item closes around it (ACC-15), refusing a disabled summary's click, closing an open item when its content is pressed (ACC-36), and every debug report. ACC-36 is the script's alone: before the element is defined, and without script, only the summary toggles its item, and the content shows no pointer cursor and no state (they would promise a press nothing answers). Once the element is defined an open item is drawn as one target by accordion.css: the `<details>` paints the container color of its state (at rest the look's container color, no fill in every shipped system), the summary paints none and is not a positioning container, so its focus ring (`::before`, with the outer stroke as the item's own `outline`) and its ripple are laid out on the whole item, under the header and the content; the content's box (`::details-content`) takes the state's opacity. The element writes `data-tanrei-hit` on the item a mouse or a pen is over where a press would toggle or close it (from `pointerover`, by the same rule as a press), which draws it hovered and gives it `cursor: pointer`; over a control in the content the attribute is off, so the control's own cursor and states show and the item's none. To tell a box the product gave the pointer cursor from the content inheriting the item's, the element sets the item's cursor aside (`data-tanrei-reading`) while it reads the pressed element's. A press in the content is the summary's press primitive (`data-pressed` on the summary), drawn on the whole item, and ends when the pointer leaves the item or moves past the slop. Where the browser has no `::details-content` the content's opacity is not changed. The element listens for `pointerdown`, `pointermove` and `click` on itself; a click closes the item when it follows a press with the primary button (any touch or pen) in that same item's content, the pointer has not moved more than 8 CSS pixels (the touch slop the sheets and the tabs use, the web naming none of its own), no modifier key is held, `event.detail` is 1, the document's selection is collapsed or outside the item, the innermost `<details>` on the event's composed path is the item itself, and nothing on that path between the target and the item is a link, a button, a field, a select, a textarea, a label, a summary, editable, a `[tabindex]`, an element with a widget role, a custom element that delegates focus or takes it, or (the element pressed) drawn with `cursor: pointer` while the item, its own pointer set aside, is not. The click is decided a task after it is dispatched, so that a handler of the product's on the content is heard first: a click it cancelled (`preventDefault()`) closes nothing. It then sets the item's `open` to false, so the browser sends `toggle` and the motion, focus and exclusive rules run as for a press on the summary. Nothing is written into the content and no style is added to anything in it. Inside `.tanrei-prose` the element is an island by its tag name (PRS-16); the product makes an item's long-form content prose by its own `<div class=\"tanrei-prose\" data-measure=\"false\">`. Markdown: a renderer passes `<details>` through as HTML; the product wraps one or several in `<tanrei-accordion>`. React: `Accordion` and `AccordionItem` render the same elements."},"swiftui":{"status":"planned","name":"TanreiAccordion","props":{"variant":"variant","size":"size","separation":"separation","exclusive":"isExclusive"},"items":{"item":{"name":"TanreiAccordionItem","props":{"label":"title","supportingText":"supportingText","trailingText":"trailingText","icon":"icon","open":"isExpanded","disabled":"disabled"},"events":{"toggle":"isExpanded"},"notes":"`TanreiAccordionItem(_ title: String, supportingText: String = \"\", trailingText: String = \"\", icon: String? = nil, isExpanded: Binding<Bool>) { content }`, as SwiftUI's `DisclosureGroup` binds its state and as `TanreiNavigationDrawerGroup` does; toggling writes the binding. A second initializer takes the label as a `@ViewBuilder` (the label slot; `.accessibilityAddTraits(.isHeader)` is the product's). `disabled` follows `.disabled(_:)`."}},"notes":"`TanreiAccordion(variant:, size:, separation:, isExclusive:) { TanreiAccordionItem(…) { … } … }`. The header is a button whose accessibility value is expanded or collapsed. An exclusive accordion writes false to the binding of the item it closes. Closed content is not in the view tree; state that must outlive a close is the product's (ACC-7). There is no search of the screen's text to answer (ACC-16)."},"compose":{"status":"planned","name":"TanreiAccordion","props":{"variant":"variant","size":"size","separation":"separation","exclusive":"exclusive"},"items":{"item":{"name":"TanreiAccordionItem","props":{"label":"label","supportingText":"supportingText","trailingText":"trailingText","icon":"icon","open":"expanded","disabled":"enabled"},"events":{"toggle":"onExpandedChange"},"notes":"`TanreiAccordionItem(label, expanded, onExpandedChange, supportingText = \"\", trailingText = \"\", icon = null, enabled = true, labelContent = null) { content }`, the names of `TanreiNavigationDrawerGroup`; the header has `Modifier.semantics { expand() / collapse() }` and the expanded state. `enabled` is the inverse flag; `labelContent` is the label slot."}},"notes":"`TanreiAccordion(variant, size, separation, exclusive) { TanreiAccordionItem(…) { … } }`, items in a scope of the accordion. Controlled: an exclusive accordion calls `onExpandedChange(false)` on the item it closes. Closed content leaves the composition; `rememberSaveable` in the content keeps what the product wants kept (ACC-7)."},"flutter":{"status":"planned","name":"TanreiAccordion","props":{"variant":"variant","size":"size","separation":"separation","exclusive":"exclusive"},"items":{"item":{"name":"TanreiAccordionItem","props":{"label":"label","supportingText":"supportingText","trailingText":"trailingText","icon":"icon","open":"expanded","disabled":"enabled"},"events":{"toggle":"onExpansionChanged"},"notes":"`TanreiAccordionItem(label:, supportingText: '', trailingText: '', icon:, expanded:, onExpansionChanged:, enabled: true, labelWidget:, child:)`, controlled, with the callback name of `TanreiNavigationDrawerGroup`; the header carries `Semantics(button: true, expanded:)`. `labelWidget` is the label slot."}},"notes":"`TanreiAccordion(variant:, size:, separation:, exclusive:, children: [TanreiAccordionItem(…)])`. An exclusive accordion calls `onExpansionChanged(false)` on the item it closes. A closed item's `child` is not built; a `PageStorageKey` or the product's own state keeps what must be kept (ACC-7)."},"react-native":{"status":"planned","name":"Accordion","props":{"variant":"variant","size":"size","separation":"separation","exclusive":"exclusive"},"items":{"item":{"name":"AccordionItem","props":{"label":"label","supportingText":"supportingText","trailingText":"trailingText","icon":"icon","open":"open","disabled":"disabled"},"events":{"toggle":"onToggle"},"notes":"`<AccordionItem label=\"…\" open={…} onToggle={…}>…</AccordionItem>`, with the names of `NavigationDrawerGroup`; controlled when `open` is given, and `defaultOpen` otherwise. The label slot is the `labelContent` prop; the content is `children`. The header sets `accessibilityRole=\"button\"` and `accessibilityState={{ expanded, disabled }}`."}},"notes":"`<Accordion variant=\"outlined\" exclusive>` with `AccordionItem` children. An exclusive accordion calls `onToggle(false)` on the item it closes. Closed content is not mounted. Follows the app's direction where an ancestor's is not known."}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"app-bar","title":"App bar","summary":"Names the current screen at its top edge and holds the way back and the screen's actions — as many as its row has room for, the rest in an overflow menu or left out, as the product chooses — its bottom edge drawn as the edge of a region that stays (or, where the design system chooses, only once content scrolls under it).","level":"base","listing":"default","anatomy":[{"id":"container","description":"The bar across the top of the screen. Its color reaches under the system inset above it (status bar, camera cutout, window caption)."},{"id":"navigation","description":"The navigation item: one icon-only Button at the start (back, menu or close). The product's icon-only Button, not restyled by the bar.","optional":true},{"id":"brand","description":"The product's brand: one link to its first page (or one image), after the navigation item, in a cell as large as an icon button's. It draws one image, the symbol alone, the wordmark alone, the symbol and the wordmark side by side (lockup), or one of the two by the window's width (responsive).","optional":true},{"id":"context","description":"The product's context: one control after the brand (a workspace, a project, a design system), the product's own Button, not restyled by the bar.","optional":true},{"id":"title","description":"The screen's name. In the top row for a small bar; under the top row for an expanded large bar, moving into the top row as it collapses."},{"id":"subtitle","description":"One line under the title: context for it (an account, a status, when it was edited).","optional":true},{"id":"actions","description":"The action items: icon-only Buttons at the end, as many as the top row has room for (APB-26). The product's icon-only Buttons, not restyled by the bar.","optional":true},{"id":"overflow-button","description":"The more button: the bar's own icon-only Button after the actions still shown, which opens a Menu of the actions that did not fit. Drawn only while overflow is menu and some action did not fit.","optional":true},{"id":"outline","description":"The bar's bottom edge. In the default system it is drawn at rest and while content is under the bar; dividerVisibility scroll draws it only once content has scrolled under the bar."}],"props":[{"name":"size","type":"enum","values":["small","large"],"default":"small","description":"Small puts the title in the one row the bar has; large gives the title a larger row of its own under the top row, which collapses into the top row as the content scrolls. One product uses small on most screens and large on its top-level ones. A design system may add values.","axis":"tanrei.comp.app-bar.size"},{"name":"title","type":"string","default":"","description":"The screen's name, and the heading of the screen for assistive technology."},{"name":"subtitle","type":"string","default":"","description":"One line under the title. Empty draws none."},{"name":"titleAlignment","type":"enum","values":["start","center"],"default":"start","description":"Where the title sits in the top row: after the navigation button, or centered on the bar. An expanded large bar's own title row always starts at the start."},{"name":"brandHref","type":"string","default":"","description":"The address of the product's first page: the brand is a link to it. Empty draws the brand as an image that is not a link."},{"name":"brandLabel","type":"string","default":"","description":"The product's name: the brand's one accessible name, whichever of its images is shown. Required wherever the bar has a brand."},{"name":"brandLayout","type":"enum","values":["lockup","responsive"],"default":"lockup","description":"How the brand's symbol and wordmark stand when the product gives both (APB-21): lockup sets them side by side, comp.app-bar.brand.lockup.gap apart and aligned as comp.app-bar.brand.lockup.alignment says; responsive shows the wordmark while the window is medium or wider and the symbol while it is compact, never both. One image, a symbol alone or a wordmark alone is shown as it is, at every width, under either value."},{"name":"scrolled","type":"boolean","default":false,"description":"Whether content lies under the bar. A scrolling view connected to the bar sets it (see platforms); a product without one sets it itself. It selects the bar's scrolled condition, and a large bar is drawn collapsed while it is true."},{"name":"dividerVisibility","type":"enum","values":["auto","always","scroll"],"default":"auto","description":"When the bar's bottom edge is drawn. always: at rest and while content is under the bar, so that the edge of the screen's header stands still (an app shell's header, a screen whose content starts right under the bar). scroll: only while content lies under the bar, so that the line itself says the content has moved (the scrolled condition's edge alone). auto takes comp.app-bar.outline.visibility, the design system's answer (always in the default system). The bar's color and elevation follow scrolled under either choice."},{"name":"overflow","type":"enum","values":["menu","hide"],"default":"menu","description":"What becomes of the action items that do not fit in the top row (APB-26): menu moves them, from the end, into a Menu opened from a more button at the end (APB-28, APB-29); hide leaves them out of the bar, for actions the product also gives somewhere else (APB-30). The bar sets no limit on the number of actions either way: every action that fits is drawn."},{"name":"overflowLabel","type":"string","default":"","description":"The more button's accessible name (\"More actions\"), in the product's language. Never drawn. Empty takes the product's words. Needed whenever overflow is menu and the bar may be narrower than its actions.","words":"toolbarOverflowLabel"}],"items":[{"name":"navigation","summary":"The one icon-only Button at the start of the top row (back, menu or close): a Button of the text variant and the medium size with an icon and no label, unless the product sets otherwise, placed in the navigation slot, which the bar lays out and does not restyle.","component":"button","props":[{"name":"label","type":"string","default":"","description":"Its accessible name (\"Back\"), as the Button's label. Required."}],"slots":[{"name":"icon","description":"Its glyph, as the Button's icon slot. A fixture item's content is this glyph."}],"events":[{"name":"click","description":"The button was activated, as the Button's click."}]},{"name":"action","summary":"An icon-only Button at the end of the top row, in reading order, as many as the row has room for: a Button of the text variant and the medium size with an icon and no label, unless the product sets otherwise, placed in the actions slot, which the bar lays out and does not restyle.","component":"button","props":[{"name":"label","type":"string","default":"","description":"Its accessible name (\"Search\"), as the Button's label. Required."},{"name":"overflow","type":"enum","values":["auto","never"],"default":"auto","description":"Whether the bar may take this action out of the top row when there is no room for it (APB-26): never keeps it, and the actions before it leave instead. Read by the bar to place the item."}],"slots":[{"name":"icon","description":"Its glyph, as the Button's icon slot. A fixture item's content is this glyph."}],"events":[{"name":"click","description":"The button was activated, as the Button's click."}]}],"slots":[{"name":"navigation","description":"Holds the navigation item: one icon-only Button at the start."},{"name":"brand","description":"The brand as one image: a product's single logo file, drawn comp.app-bar.brand.image.height high. Takes the place of brand-symbol and brand-wordmark where both are given.","fixture":"mark"},{"name":"brand-symbol","description":"The brand's symbol: comp.app-bar.brand.symbol.size high alone, or while the window is compact under brandLayout responsive; comp.app-bar.brand.lockup.symbol.size high (the wordmark's height) beside the wordmark in a lockup.","fixture":"mark"},{"name":"brand-wordmark","description":"The brand's wordmark, drawn comp.app-bar.brand.wordmark.height high: alone at every width, after the symbol in a lockup, or while the window is medium or wider under brandLayout responsive.","fixture":"mark"},{"name":"context","description":"Holds one control of the product's context after the brand: a Button, or a Button that opens a Menu, that says and changes the workspace, the project or the design system the screen is in. The product's own control, not restyled by the bar."},{"name":"actions","description":"Holds the action items: icon-only Buttons at the end, in reading order, with no limit on their number. Those that do not fit leave from the end, into the overflow menu or out of the bar as overflow says (APB-26)."}],"states":["enabled"],"behavior":[{"id":"APB-1","text":"WHILE scrolled is false THE app bar SHALL fill its container with comp.app-bar.flat.container.color, raise it by comp.app-bar.flat.container.elevation and draw its bottom edge comp.app-bar.outline.width thick: in comp.app-bar.scrolled.outline.color WHILE its divider visibility (APB-18) is always, so that the edge stands still whether or not content lies under the bar, and in comp.app-bar.flat.outline.color WHILE it is scroll."},{"id":"APB-2","text":"WHILE scrolled is true THE app bar SHALL fill its container with comp.app-bar.scrolled.container.color, raise it by comp.app-bar.scrolled.container.elevation and draw its bottom edge comp.app-bar.outline.width thick in comp.app-bar.scrolled.outline.color, under either divider visibility (APB-18)."},{"id":"APB-3","text":"WHEN scrolled changes THE app bar SHALL change its container color, elevation and bottom edge over comp.app-bar.motion.condition-duration with comp.app-bar.motion.condition-easing, and at once where motion is reduced; WHILE its divider visibility (APB-18) is always the bottom edge SHALL NOT change."},{"id":"APB-4","text":"THE app bar SHALL span the full width of its parent and lay out a top row at least comp.app-bar.container.height.small high: the navigation item comp.app-bar.container.padding-inline from the start edge, the title block, and the action items comp.app-bar.container.padding-inline from the end edge, with comp.app-bar.container.gap between them and comp.app-bar.actions.gap between two actions, each vertically centered in the row; a navigation item SHALL go to the start and action items to the end wherever they stand among the items; WHILE there is no navigation item the title block SHALL start comp.app-bar.title.inset from the start edge, and WHILE there are no action items it SHALL end comp.app-bar.title.inset from the end edge. Right-to-left layouts SHALL mirror the order."},{"id":"APB-5","text":"THE app bar SHALL draw a title in the top row on one line in comp.app-bar.title.typescale.small and comp.app-bar.title.color, and WHILE subtitle is not empty the subtitle on one line below it in comp.app-bar.subtitle.typescale.small and comp.app-bar.subtitle.color, the two vertically centered as a block; each SHALL be truncated at the end with an ellipsis when it does not fit. THE app bar SHALL set the title's letter-spacing, in every size, by the script of its text, as every title is set (PRS-20): no negative letter-spacing WHERE its language is Chinese, Japanese or Korean, and none WHERE its script joins its letters or stacks marks on them."},{"id":"APB-6","text":"WHILE titleAlignment is center THE app bar SHALL center the top row's title block on the bar's full width and narrow it equally on both sides, truncating its text, so that it never overlaps the navigation or actions slots, and SHALL center its text; WHILE titleAlignment is start THE app bar SHALL start the title block after the navigation slot (or at comp.app-bar.title.inset) with its text start-aligned."},{"id":"APB-7","text":"WHILE size is large and the bar is expanded THE app bar SHALL be at least comp.app-bar.container.height.large high, SHALL draw no title in its top row, and SHALL draw below the top row the title in comp.app-bar.title.typescale.large and, WHILE subtitle is not empty, the subtitle in comp.app-bar.subtitle.typescale.large, both starting comp.app-bar.title.inset from the start edge, each on one line truncated at the end, the block ending comp.app-bar.container.padding-block-end above the bar's bottom edge."},{"id":"APB-8","text":"WHILE size is large and a scrolling view is connected THE app bar SHALL shrink by the distance the content has scrolled from its top, one for one, from its expanded height to comp.app-bar.container.height.small, the expanded title block moving up with the bar's bottom edge and clipped under the top row; the top row's title SHALL be invisible while the expanded title is wholly visible, fully visible once the bar has collapsed, and in between fade in linearly with the part of the expanded title that is covered. WHEN the content scrolls back toward its top THE app bar SHALL expand the same way."},{"id":"APB-9","text":"WHERE a scrolling view is connected THE app bar SHALL take scrolled from it: true while any content lies under the bar (for a large bar, only once it has fully collapsed) and false when the content is at its top. WHILE size is large and scrolled is true THE app bar SHALL be drawn fully collapsed; WHERE nothing is connected and scrolled is false a large app bar SHALL stay expanded."},{"id":"APB-10","text":"THE app bar SHALL extend its container under the top system inset (status bar, camera cutout, window caption) and SHALL place its content below that inset and inside the left and right insets, so that its color reaches the screen's top edge while no content sits under a system bar or cutout."},{"id":"APB-11","text":"THE app bar SHALL NOT restyle its navigation and action items: each SHALL render as the icon-only Button it is, from its own tokens, and keep its own semantics, and the app bar SHALL NOT be focusable itself, so that focus moves from the navigation item to the action items in reading order, and then to the more button where it is drawn (APB-28). A glyph of an item that the system's icon set marks as mirrored (a navigation item's arrow_back) SHALL be mirrored in a right-to-left layout by the item's own icon helper (BTN-19): that is the icon's own behaviour, not a restyling by the app bar."},{"id":"APB-12","text":"THE app bar SHALL expose title as a heading and subtitle as text read after it, and SHALL expose the title only once WHILE size is large: the expanded title while any of it is visible, the top row's title once the bar has collapsed."},{"id":"APB-13","text":"WHILE title is empty THE app bar SHALL draw no title block (an expanded large bar then has an empty title row) and SHALL expose no heading; IF the app bar holds more than one navigation item THE app bar SHALL still render them, and in debug builds report that a bar has one navigation button."},{"id":"APB-14","text":"WHEN size names a value that the active design system does not have THE app bar SHALL render with the default value's tokens, and in debug builds report the unknown value."},{"id":"APB-15","text":"WHILE the text size is enlarged THE app bar SHALL grow its rows to hold the title and subtitle lines (its heights are minimums), SHALL keep each on one line truncated at the end, and SHALL NOT scale the navigation and action items it holds."},{"id":"APB-16","text":"THE app bar SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the app bar is shown THE app bar SHALL draw itself for the new direction at once, without a motion of its own, keeping its size and the scroll state it follows."},{"id":"APB-17","text":"THE app bar SHALL lay out its title and its subtitle as text of its own direction, isolated from the text around it: each takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right word, a number with its sign or unit, a telephone number and an address keep their own order in a right-to-left layout and reorder nothing beside them; THE app bar SHALL still place each and align its lines by the layout direction, not by the text's own, and SHALL cut a title or a subtitle that does not fit (APB-5, APB-7) at the end of its own direction, so that a left-to-right label in a right-to-left layout loses its right end and never its beginning."},{"id":"APB-18","text":"THE app bar SHALL draw its bottom edge (APB-1, APB-2) as its dividerVisibility names: WHILE dividerVisibility is auto, as comp.app-bar.outline.visibility names, which follows sys.behavior.divider-visibility unless a design system sets the app bar apart; WHILE dividerVisibility is always or scroll, as that value names, whatever the tokens say. WHEN dividerVisibility, or the token it follows, changes THE app bar SHALL draw the other form at once, moving no part and keeping the scroll position and focus; WHEN dividerVisibility names a value the app bar does not define THE app bar SHALL treat it as auto and in debug builds report the unknown value. A platform that cannot draw a choice SHALL fall back to the first value, always, and state that in its README."},{"id":"APB-19","text":"WHERE the product gives the app bar a brand (an image in brand, brand-symbol or brand-wordmark) THE app bar SHALL place it at the start of the top row, after the navigation item at comp.app-bar.actions.gap from it, or comp.app-bar.container.padding-inline from the start edge WHILE no navigation item is drawn, with the title block after it at comp.app-bar.container.gap; the brand SHALL take a cell at least the minimum target and a medium icon-only Button high and wide (the navigation item's cell, APB-11), padded at its start and end by half that cell less comp.app-bar.brand.symbol.size, its images centred on the row's centre line, so that a symbol stands where an icon button's icon stands and a wordmark keeps that inset from the cell's edges. Right-to-left layouts SHALL mirror the order."},{"id":"APB-20","text":"THE app bar SHALL draw the image in brand comp.app-bar.brand.image.height high, the symbol comp.app-bar.brand.symbol.size high and the wordmark comp.app-bar.brand.wordmark.height high, each as wide as its own proportions make it, and SHALL give the brand comp.app-bar.brand.color, which an image drawn in the current color takes and an image of its own colors keeps. WHILE the brand is a lockup THE app bar SHALL draw the symbol and then the wordmark in one row, comp.app-bar.brand.lockup.gap apart, aligned in the row's block axis as comp.app-bar.brand.lockup.alignment names (center, start or end)."},{"id":"APB-21","text":"WHERE the brand holds one image, a symbol alone or a wordmark alone THE app bar SHALL show it at every window width. WHERE it holds both a symbol and a wordmark, WHILE brandLayout is lockup THE app bar SHALL show both as a lockup (APB-20), and WHILE brandLayout is responsive THE app bar SHALL show the wordmark WHILE the window class is medium or expanded and the symbol WHILE it is compact, never both: the window class of the app shell the bar stands in, or, outside one, the window's width against sys.breakpoint.medium. WHEN the window class changes THE app bar SHALL show the other at once, without a motion of its own, the brand's link and its focus unchanged."},{"id":"APB-22","text":"THE app bar SHALL expose the brand as one link to brandHref named by brandLabel — or, WHILE brandHref is empty, as one image named by brandLabel — between the navigation item and the action items in reading order, and SHALL hide the brand's images from assistive technology, so that the product's name is read once whichever arrangement is shown. THE brand's link SHALL be a stop in the tab order and SHALL draw the focus indicator around its cell, in the shape comp.app-bar.brand.shape."},{"id":"APB-23","text":"IF brandLayout names a value the app bar does not define THE app bar SHALL treat it as lockup and in debug builds report it; IF brand holds an image together with brand-symbol or brand-wordmark THE app bar SHALL show the image in brand alone and in debug builds report the others; IF the bar has a brand and brandLabel is empty, or a brand slot holds more than one image, THE app bar SHALL still draw what it holds and in debug builds report what is missing or extra."},{"id":"APB-24","text":"WHILE the brand is a lockup THE app bar SHALL draw the symbol comp.app-bar.brand.lockup.symbol.size high, which is the wordmark's height (comp.app-bar.brand.wordmark.height) unless a design system sets it apart, so that the symbol and the wordmark stand at one height; a symbol shown alone keeps comp.app-bar.brand.symbol.size."},{"id":"APB-25","text":"WHERE the product puts a control in context THE app bar SHALL place it at the start of the top row after the brand, at comp.app-bar.actions.gap from the brand's cell (from the navigation item WHILE no brand is drawn, and comp.app-bar.container.padding-inline from the start edge WHILE neither is), vertically centred in the row, with the title block after it at comp.app-bar.container.gap; SHALL NOT restyle it, as APB-11 says of the navigation and action items; and SHALL keep it in reading order after the brand and before the title block and the action items. Right-to-left layouts SHALL mirror the order."},{"id":"APB-26","text":"THE app bar SHALL draw every action item that fits in the top row, and SHALL set no limit on their number. The actions fit WHILE the row holds, beside them and at their own sizes, the navigation item, the brand's cell and the control in context, and the title block as wide as its title and its subtitle need on one line in the top row's text roles (APB-5) — for a large bar whether or not the top row draws its title now (APB-8), so that no action moves as the bar collapses — with the paddings and gaps APB-4 names, the title block centred on the bar WHILE titleAlignment is center (APB-6), and the more button WHILE overflow is menu and an action is out (APB-28). WHEN the actions do not fit THE app bar SHALL take them out from the end, in reverse reading order and one at a time, skipping every action whose overflow is never and every element of the actions slot that is not a Button, until what remains fits; WHEN what remains still does not fit THE app bar SHALL truncate the title as APB-5 and APB-6 say, and SHALL NOT shrink or take out the navigation item, the brand or the control in context. Right-to-left layouts SHALL mirror the order (APB-4): the actions leave from the end of the reading order, at the left."},{"id":"APB-27","text":"WHEN the room the top row has, the size of one of its items, its title or subtitle, or the action items change THE app bar SHALL decide again which actions fit, as APB-26 says, bringing actions back in reading order as soon as they fit, so that which actions are shown depends only on the room and the items, never on the widths the bar had before."},{"id":"APB-28","text":"WHILE overflow is menu and at least one action is out (APB-26) THE app bar SHALL draw the more button after the last action still shown, comp.app-bar.actions.gap from it: an icon-only Tanrei Button of the text variant and the medium size showing the glyph more_horiz, named by overflowLabel or the product's words, exposed as a button that opens a menu, with its expanded state while the menu is open; WHILE every action is shown, or overflow is hide, THE app bar SHALL draw no more button. The more button SHALL be a stop in the tab order after the actions shown."},{"id":"APB-29","text":"WHEN the more button is activated by pointer, touch, Enter or Space THE app bar SHALL open a Tanrei Menu anchored to it, placed bottom-end, holding the actions that are out, in reading order: each action as a menu item with its label and its glyph as the leading icon, disabled while it is; a toggle as a checkbox item with its selected state; an action that is a link (it has an href) as a link item to the same destination and target; and an action that opens a Menu as a submenu item named by its label, holding that Menu's items. Activating a row SHALL do exactly what activating the action does — the same click (and change), once, from that action — and close the menu, which returns focus to the more button; WHEN the actions that are out change while the menu is open THE app bar SHALL close it."},{"id":"APB-30","text":"WHILE overflow is hide THE app bar SHALL draw nothing in place of an action that is out: neither drawn nor focusable nor exposed to assistive technology, it SHALL stay in the page with its state and its listeners, and come back as APB-27 says. Reaching what a hidden action does is the product's responsibility: hide is for an action the product also gives somewhere the person can reach at that width (a drawer, a page's footer, a settings page), and the app bar SHALL NOT report one that is not."},{"id":"APB-31","text":"WHEN an action that has keyboard focus goes out (APB-26) THE app bar SHALL move focus, without scrolling the page, to the more button WHILE overflow is menu; and WHILE overflow is hide to the nearest action still shown before it in reading order, else the nearest after it, else the control in context, the brand's link or the navigation item, the last of them that takes focus, so that focus never falls to the page."},{"id":"APB-32","text":"THE app bar SHALL decide which actions are shown before the first frame that draws them, and after a change APB-27 names before the next frame, from sizes measured then — each action's while it is drawn, kept while it is out — so that no frame draws an action that then leaves or a more button that then goes away; it SHALL show and hide them at once, without a motion of its own, and deciding SHALL NOT change the room it decides from, so that it never measures again because of its own decision."},{"id":"APB-33","text":"WHEN overflow names a value the app bar does not define THE app bar SHALL treat it as menu and in debug builds report the unknown value; WHEN an action's overflow names a value other than never THE app bar SHALL treat it as auto. IF overflow is menu, an action is out and the more button has no name (overflowLabel is empty and the product's words have none) THE app bar SHALL still draw the more button and open its menu, and in debug builds report the missing word."},{"id":"APB-34","text":"WHERE the platform shows the product's markup before the component runs (the web, before its element is defined) THE app bar SHALL take, from its first paint, the block size it will have once it runs, so that nothing under it moves when it does: the top system inset (APB-10), and a top row comp.app-bar.container.height.small high, or as high as the cell of an item it holds (APB-11, APB-19) or as the title and, WHILE the title is not empty, the subtitle need on their lines in comp.app-bar.title.typescale.small and comp.app-bar.subtitle.typescale.small (APB-5, APB-15) where that is more; WHILE size is large and the bar will be drawn expanded (APB-9: scrolled is false, or a scrolling view is connected, at its top as a page is when it loads) the title row under it as well: comp.app-bar.container.height.large less comp.app-bar.container.height.small, or as high as the title and the subtitle need in comp.app-bar.title.typescale.large and comp.app-bar.subtitle.typescale.large with comp.app-bar.container.padding-block-end under them where that is more (APB-7). Until it runs THE app bar SHALL fill its container with the container color of its condition (APB-1, APB-2) and SHALL show nothing of what its slots hold, because a glyph is a name until its Button draws it."}],"accessibility":{"role":"none","keyboard":[{"keys":"Tab","action":"Moves focus to the navigation item, then to the brand's link, then to the control in context, then through the action items shown and to the more button where it is drawn; the bar itself is not a tab stop. An action that is out is not a stop."},{"keys":"Enter or Space (on the more button)","action":"Opens the Menu of the actions that are out, with focus on its first item; the Menu's own keys move through it, and Escape closes it and returns focus to the more button."}],"labeling":"The title is the screen's heading (a level 1 heading on the web unless the product sets another level). The subtitle is read after it. The navigation and action items, and the control in context, are named by their own labels. The brand is one link to the product's first page named by brandLabel (the product's name), whichever of its images is shown; its images are hidden from assistive technology. The more button is named by overflowLabel or the product's words (\"More actions\"), and exposed as a button that opens a menu, with its expanded state.","minimumTarget":true,"notes":["The app bar has no role of its own and takes no input: its buttons are the product's icon-only Buttons, which meet the minimum target themselves (BTN-5). The bar is not a landmark, because only the product knows whether it is its page's banner; a product that wants one wraps the bar in its own header element.","The title is truncated rather than wrapped even at 200% text size: the bar's rows grow with the text, but a bar of several lines would push the screen's content away. The full title stays available to assistive technology.","Where both titles of a large bar are partly visible, only the expanded one is exposed, so the heading is never read twice.","The bar sets no limit on the number of actions: as many as fit are drawn, and the rest are in the more button's menu, each with its label, or, under overflow hide, left out of the bar. A hidden action is out of the tab order and of the accessibility tree, so what it does must be reachable elsewhere at that width (APB-30)."]},"tokens":"comp.app-bar","fixtures":[{"id":"small","props":{"title":"Inbox"},"items":[{"kind":"navigation","props":{"label":"Back"},"content":"arrow_back"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"More options"},"content":"more_vert"}]},{"id":"small-scrolled","props":{"title":"Inbox","scrolled":true},"items":[{"kind":"navigation","props":{"label":"Back"},"content":"arrow_back"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"More options"},"content":"more_vert"}]},{"id":"small-center","props":{"title":"Inbox","titleAlignment":"center"},"items":[{"kind":"navigation","props":{"label":"Back"},"content":"arrow_back"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"More options"},"content":"more_vert"}]},{"id":"small-subtitle","props":{"title":"Quarterly report","subtitle":"Edited 5 minutes ago"},"items":[{"kind":"navigation","props":{"label":"Back"},"content":"arrow_back"},{"kind":"action","props":{"label":"Share"},"content":"share"}]},{"id":"small-title-only","props":{"title":"Settings"}},{"id":"large","props":{"size":"large","title":"Inbox"},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"Account"},"content":"account_circle"}]},{"id":"large-subtitle","props":{"size":"large","title":"Inbox","subtitle":"ada@example.com"},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"Account"},"content":"account_circle"}]},{"id":"large-scrolled","props":{"size":"large","title":"Inbox","scrolled":true},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"Account"},"content":"account_circle"}]},{"id":"small-brand","props":{"brandHref":"/","brandLabel":"Tanrei"},"slots":{"brand":"wordmark"},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"}]},{"id":"small-brand-symbol","props":{"brandHref":"/","brandLabel":"Tanrei","title":"Inbox"},"slots":{"brand-symbol":"symbol"},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"}]},{"id":"small-brand-wordmark","props":{"brandHref":"/","brandLabel":"Tanrei"},"slots":{"brand-wordmark":"wordmark"},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"}]},{"id":"small-brand-lockup","props":{"brandHref":"/","brandLabel":"Tanrei"},"slots":{"brand-symbol":"symbol","brand-wordmark":"wordmark"},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"}]},{"id":"small-brand-responsive","props":{"brandHref":"/","brandLabel":"Tanrei","brandLayout":"responsive"},"slots":{"brand-symbol":"symbol","brand-wordmark":"wordmark"},"items":[{"kind":"navigation","props":{"label":"Menu"},"content":"menu"},{"kind":"action","props":{"label":"Search"},"content":"search"}]},{"id":"small-overflow-menu","props":{"title":"Inbox","overflowLabel":"More actions"},"items":[{"kind":"navigation","props":{"label":"Back"},"content":"arrow_back"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"Share"},"content":"share"},{"kind":"action","props":{"label":"Edit"},"content":"edit"},{"kind":"action","props":{"label":"Archive"},"content":"archive"},{"kind":"action","props":{"label":"Delete"},"content":"delete"},{"kind":"action","props":{"label":"Print"},"content":"print"}]},{"id":"small-overflow-hide","props":{"title":"Inbox","overflow":"hide"},"items":[{"kind":"navigation","props":{"label":"Back"},"content":"arrow_back"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"Share"},"content":"share"},{"kind":"action","props":{"label":"Edit"},"content":"edit"},{"kind":"action","props":{"label":"Archive"},"content":"archive"},{"kind":"action","props":{"label":"Delete"},"content":"delete"},{"kind":"action","props":{"label":"Print"},"content":"print"}]},{"id":"small-overflow-rtl","direction":"rtl","props":{"title":"Inbox","overflowLabel":"More actions"},"items":[{"kind":"navigation","props":{"label":"Back"},"content":"arrow_back"},{"kind":"action","props":{"label":"Search"},"content":"search"},{"kind":"action","props":{"label":"Share"},"content":"share"},{"kind":"action","props":{"label":"Edit"},"content":"edit"},{"kind":"action","props":{"label":"Archive"},"content":"archive"},{"kind":"action","props":{"label":"Delete"},"content":"delete"},{"kind":"action","props":{"label":"Print"},"content":"print"}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-app-bar","props":{"size":"size","title":"headline","subtitle":"subtitle","titleAlignment":"titleAlignment","scrolled":"scrolled","dividerVisibility":"dividerVisibility","brandHref":"brandHref","brandLabel":"brandLabel","brandLayout":"brandLayout","overflow":"overflow","overflowLabel":"overflowLabel"},"parts":{"container":"container","navigation":"slot:navigation","brand":"brand","context":"slot:context","title":"title","subtitle":"subtitle","actions":"slot:actions","overflow-button":"overflow-button","outline":"outline"},"notes":"`title` is the `headline` property and attribute, because HTML's global `title` attribute would show a tooltip over the whole bar. `titleAlignment` is the `title-alignment` attribute. The slots are `navigation`, `context` and `actions`. `overflow` is the `overflow` attribute (`menu` | `hide`) and `overflowLabel` the `overflow-label` attribute; an action's own overflow is its `app-bar-overflow` attribute (`auto` | `never`). The bar watches its top row, its start items, its title and each action drawn with one ResizeObserver, and decides from the widths measured then, before the frame: an action that is out carries the bar's `app-bar-out` attribute, which draws it as nothing (it stays in the page, with its listeners and its state). The more button (`part=\"overflow-button\"`) and its Menu (`part=\"overflow-menu\"`) are elements of the bar's shadow root; the Menu's rows are made from the actions when it opens. A web-only `scroll-target` attribute names the id of the scrolling element to connect (default: the document's scrolling element; `none` connects nothing), from which the bar sets `scrolled` itself. A web-only `heading-level` (default 1) sets the title's heading level. Insets are `env(safe-area-inset-top|left|right)`. `dividerVisibility` is the `divider-visibility` attribute (`auto`, `always`, `scroll`); `auto` reads `--tanrei-comp-app-bar-outline-visibility` from the cascade with a style query, and where the browser has none the bar writes the name it read on its container when it renders. The brand: `brand-href`, `brand-label` and `brand-layout` (`lockup` | `responsive`); its images are children with `slot=\"brand\"`, `slot=\"brand-symbol\"` or `slot=\"brand-wordmark\"` (an `<img>` or an inline `<svg>`), which the bar sizes from its tokens, marks `aria-hidden` and draws inside its own link (`part=\"brand\"`). The link is the bar's: a router that follows links by their clicks reads it from the click's composed path. The window class is the enclosing `<tanrei-app-shell>`'s, else `matchMedia` against `sys.breakpoint.medium`. Before the element is defined, `@tanrei/web/app-bar.css` gives it the block size it will have (APB-34): a page that loads the bar's script late does not move.","items":{"navigation":{"name":"tanrei-button","props":{"label":"label"},"events":{"click":"click"},"notes":"An icon-only `<tanrei-button>` child with `slot=\"navigation\"`; the glyph is its content."},"action":{"name":"tanrei-button","props":{"label":"label","overflow":"app-bar-overflow"},"events":{"click":"click"},"notes":"An icon-only `<tanrei-button>` child with `slot=\"actions\"`; the glyph is its content."}}},"swiftui":{"status":"lagging","name":"TanreiAppBar","props":{"size":"size","title":"title","subtitle":"subtitle","titleAlignment":"titleAlignment","scrolled":"isScrolled","dividerVisibility":"dividerVisibility","brandHref":"brandHref","brandLabel":"brandLabel","brandLayout":"brandLayout","overflow":"overflow","overflowLabel":"overflowLabel"},"notes":"`TanreiAppBar(_ title:, subtitle:, size:, titleAlignment:, isScrolled: Bool? = nil) { navigation } actions: { … }`, placed with `.safeAreaInset(edge: .top)` in a `NavigationStack` whose system bar is hidden; the system bar's heights, title font and edge cannot be set from the tokens. Hiding it must not lose the interactive back swipe: the implementation keeps it working. The connected scroll view is the one marked `.tanreiAppBarScrollSource()`, applied after the `.safeAreaInset` that holds the bar (the inset's content sees only the environment where the inset is applied); it connects on iOS 18 and macOS 15 and later. `isScrolled: nil` follows it, a value overrides it. Not yet: the title's letter-spacing by the script of its text (APB-5, PRS-20). Not built on this platform yet: `dividerVisibility` (auto, always, scroll; APB-18) — the bar still draws its bottom edge from its condition's outline color, as `scroll` does. Not built on this platform yet: the brand (`brandHref`, `brandLabel`, `brandLayout` and its slots, APB-19 to APB-24). Not built on this platform yet: the context slot (APB-25). Not built on this platform yet: the overflow (`overflow`, `overflowLabel` and the action's own overflow; APB-26 to APB-33) — every action is drawn, whatever the room.","items":{"navigation":{"name":"TanreiButton","props":{"label":"label"},"events":{"click":"action"},"notes":"An icon-only `TanreiButton` in the `navigation` view builder."},"action":{"name":"TanreiButton","props":{"label":"label","overflow":"appBarOverflow"},"events":{"click":"action"},"notes":"An icon-only `TanreiButton` in the `actions` view builder."}}},"compose":{"status":"lagging","name":"TanreiAppBar","props":{"size":"size","title":"title","subtitle":"subtitle","titleAlignment":"titleAlignment","scrolled":"scrollBehavior","dividerVisibility":"dividerVisibility","brandHref":"brandHref","brandLabel":"brandLabel","brandLayout":"brandLayout","overflow":"overflow","overflowLabel":"overflowLabel"},"notes":"Compose idiom (as `TopAppBar`): `TanreiAppBar(title, navigationIcon = { … }, actions = { … }, subtitle, size, titleAlignment, scrollBehavior, windowInsets)`. `scrollBehavior` (`TanreiAppBarDefaults.pinnedScrollBehavior()` for small, `.collapseScrollBehavior()` for large) is connected with `Modifier.nestedScroll(scrollBehavior.nestedScrollConnection)`, and its state carries scrolled and the collapse; without one the bar is flat and expanded, and a state created with a given offset draws the scrolled fixtures. `windowInsets` defaults to the status bars plus the horizontal display cutout. Not yet: the title's letter-spacing by the script of its text (APB-5, PRS-20). Not built on this platform yet: `dividerVisibility` (auto, always, scroll; APB-18) — the bar still draws its bottom edge from its condition's outline color, as `scroll` does. Not built on this platform yet: the brand (`brandHref`, `brandLabel`, `brandLayout` and its slots, APB-19 to APB-24). Not built on this platform yet: the context slot (APB-25). Not built on this platform yet: the overflow (`overflow`, `overflowLabel` and the action's own overflow; APB-26 to APB-33) — every action is drawn, whatever the room.","items":{"navigation":{"name":"TanreiButton","props":{"label":"contentDescription"},"events":{"click":"onClick"},"notes":"An icon-only `TanreiButton` in the `navigationIcon` lambda."},"action":{"name":"TanreiButton","props":{"label":"contentDescription","overflow":"Modifier.appBarOverflow"},"events":{"click":"onClick"},"notes":"An icon-only `TanreiButton` in the `actions` lambda."}}},"flutter":{"status":"lagging","name":"TanreiAppBar","props":{"size":"size","title":"title","subtitle":"subtitle","titleAlignment":"centerTitle","scrolled":"scrolledUnder","dividerVisibility":"dividerVisibility","brandHref":"brandHref","brandLabel":"brandLabel","brandLayout":"brandLayout","overflow":"overflow","overflowLabel":"overflowLabel"},"notes":"Flutter idiom (as `AppBar` and `SliverAppBar.large`): `TanreiAppBar` is a `PreferredSizeWidget` for `Scaffold.appBar`, with `leading`, `actions`, `title` (a String), `subtitle`, `size` and `centerTitle` (true for center). `scrolledUnder: null` follows the `ScrollNotification`s of the scaffold's body, as `AppBar`'s scrolled-under state does; a bool overrides it. A large bar that collapses is `TanreiSliverAppBar` inside a `CustomScrollView`. Insets through `SafeArea`/`MediaQuery.padding`. Not yet: the title's letter-spacing by the script of its text (APB-5, PRS-20). Not built on this platform yet: `dividerVisibility` (auto, always, scroll; APB-18) — the bar still draws its bottom edge from its condition's outline color, as `scroll` does. Not built on this platform yet: the brand (`brandHref`, `brandLabel`, `brandLayout` and its slots, APB-19 to APB-24). Not built on this platform yet: the context slot (APB-25). Not built on this platform yet: the overflow (`overflow`, `overflowLabel` and the action's own overflow; APB-26 to APB-33) — every action is drawn, whatever the room.","items":{"navigation":{"name":"TanreiButton","props":{"label":"semanticLabel"},"events":{"click":"onPressed"},"notes":"An icon-only `TanreiButton` given as `leading`."},"action":{"name":"TanreiButton","props":{"label":"semanticLabel","overflow":"appBarOverflow"},"events":{"click":"onPressed"},"notes":"An icon-only `TanreiButton` in the bar's `actions:` list."}}},"react-native":{"status":"lagging","name":"AppBar","props":{"size":"size","title":"title","subtitle":"subtitle","titleAlignment":"titleAlignment","scrolled":"scrolled","dividerVisibility":"dividerVisibility","brandHref":"brandHref","brandLabel":"brandLabel","brandLayout":"brandLayout","overflow":"overflow","overflowLabel":"overflowLabel"},"notes":"`navigation` and `actions` are React nodes (an icon-only `Button`, and a fragment of the actions). The scroll connection is a hook: `const scroll = useAppBarScroll()` gives `scroll.onScroll` for a `ScrollView` or `FlatList` and `scroll.state` for the bar's `scrollState` prop, which sets scrolled and the collapse; without it the bar draws what `scrolled` says. Insets come from the bar's own `insets` prop, side by side, falling back to `TanreiProvider`'s `insets`; the package takes no safe-area dependency, and a product that uses `react-native-safe-area-context` passes its `useSafeAreaInsets()` to either. Not yet: the title's letter-spacing by the script of its text (APB-5, PRS-20). Not built on this platform yet: `dividerVisibility` (auto, always, scroll; APB-18) — the bar still draws its bottom edge from its condition's outline color, as `scroll` does. Not built on this platform yet: the brand (`brandHref`, `brandLabel`, `brandLayout` and its slots, APB-19 to APB-24). Not built on this platform yet: the context slot (APB-25). Not built on this platform yet: the overflow (`overflow`, `overflowLabel` and the action's own overflow; APB-26 to APB-33) — every action is drawn, whatever the room.","items":{"navigation":{"name":"Button","props":{"label":"accessibilityLabel"},"events":{"click":"onPress"},"notes":"An icon-only `Button` element passed as `navigation`."},"action":{"name":"Button","props":{"label":"accessibilityLabel","overflow":"appBarOverflow"},"events":{"click":"onPress"},"notes":"An icon-only `Button` element among the `actions` nodes."}}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"app-shell","title":"App shell","summary":"Frames a page or an app: places a header, the navigation, the main content, an aside and a footer, decides from the window's width how each of them is shown, and lets a keyboard reach the content in one step; it draws the frame and none of what stands in it.","level":"base","listing":"default","anatomy":[{"id":"container","description":"The frame itself: the whole window (or the whole page), filled with the product's surface color. It carries no state and takes no input."},{"id":"skip-link","description":"A Link the product gives (\"Skip to content\") that the shell keeps out of sight until the keyboard reaches it, then shows in a small raised box at the top start corner of the window. The first thing the keyboard reaches; following it moves focus to the main region.","optional":true},{"id":"announcement","description":"A strip across the top of the frame, above the header, for a notice that concerns the whole product (a callout the product places there: an outage, a new version, a page that is not translated).","optional":true},{"id":"header","description":"The region across the top that names the product or the screen and holds its search and its actions: the product's app bar. The page's banner landmark.","optional":true},{"id":"menu-button","description":"An icon-only Button the product puts in its header and marks as the shell's — or, in a frame whose header region is empty, gives in the menu-button slot, where it stands alone in the header's place and stays at the top of the window while the page scrolls, with no band around it (APS-34). The shell shows it in every window class (with menuButtonPlacement drawer, only while the navigation has no place in the layout). It opens and closes the navigation over the content, and where the navigation stands beside the content shows, hides or collapses it.","optional":true},{"id":"navigation","description":"The region at the start edge that holds the product's destinations: a navigation drawer. Beside the main content in a wide window, its column of icons in a narrower one, and over the content in a narrow one — below the header, which stays in view and usable.","optional":true},{"id":"main","description":"The content the page is for, and the page's one main landmark. Inset from the frame by a gutter and, by default, no wider than a readable width."},{"id":"aside","description":"Content that supports the main content: an outline of the page, details of the selected thing, related links. Beside the main content at the end edge in a wide window, above or below it in a narrower one. A complementary landmark.","optional":true},{"id":"footer","description":"The region at the end of the page for what belongs to the whole site: its links, its legal line, its language and theme controls. The page's content-information landmark. Shown while the product fills it and has not hidden it (footerHidden).","optional":true},{"id":"navigation-bar","description":"The place at the bottom edge for a navigation bar, shown only in a narrow window, for a product whose three to five top-level destinations stay in reach of the thumb.","optional":true},{"id":"outline","description":"The hairline the shell draws between two regions that touch, where the system parts things with a line and the region's own component draws none: above the footer, and at the edge of an aside that is not a side sheet.","optional":true}],"props":[{"name":"scroll","type":"enum","values":["page","main"],"default":"page","description":"What scrolls. page: the whole page scrolls in the window, the header stays at the top (headerPosition) and the navigation and the aside stay in view beside the content; the default, because it is what find-in-page, anchors, the back button's return to where the reader was, and a phone browser's collapsing bars are built for. main: the frame is exactly as tall as the window and only the main region scrolls inside it, for an app whose panes scroll apart from each other (a mail client, an editor)."},{"name":"headerPosition","type":"enum","values":["sticky","static"],"default":"sticky","description":"Whether the header stays at the top of the window while the page scrolls (sticky) or scrolls away with it (static: an article that should have the whole window). Ignored while scroll is main, where the header never moves."},{"name":"mainWidth","type":"enum","values":["contained","full"],"default":"contained","description":"contained: the main region's content is no wider than the shell's readable width and is centred in the room the region has, for pages that are read. full: it takes all the room inside the gutters, for a table, a board, an editor."},{"name":"asideOrder","type":"enum","values":["after","before"],"default":"after","description":"Where the aside stands in reading and focus order, and so where it is drawn when it is not beside the main content. after: it follows the main content and is drawn below it (related links, details). before: it precedes the main content and is drawn above it (an outline of the page, which is of use only before the page is read). Beside the main content it is drawn at the end edge either way."},{"name":"footerHidden","type":"boolean","default":false,"description":"Whether the footer is left out of the frame although the product fills it: a screen that is a task rather than a page of the site (a checkout, a sign-in, an editor, a full-window map) keeps the site's footer markup and shows none. While true the footer takes no space, draws no line, is no landmark and has no stop in focus order, exactly as an empty footer region. The footer is shown only while the product fills the footer slot and this is false: footerHidden never makes a footer of an unfilled slot."},{"name":"separation","type":"enum","values":["auto","divider","gap"],"default":"auto","description":"How regions that touch are told apart. auto takes the design system's choice through comp.app-shell.separation; divider draws the one hairline; gap draws nothing and leaves the regions' own spaces. It concerns only the edges the shell draws: a component in a region that has an edge of its own (an app bar, a navigation drawer, a side sheet) keeps it."},{"name":"navigationOpen","type":"boolean","default":false,"description":"Whether the navigation is open: presented over the content — below the header — while it has no place of its own in the layout (or only its column), and shown beside the content while it stands there even where a person hid it. The menu button asks for true and, while it is true, for false; beside the content it asks for false as it hides the navigation and for true as it shows it again (NVD-106); closing the navigation makes it false. A change of the window's class keeps it."},{"name":"menuButtonPlacement","type":"enum","values":["header","drawer"],"default":"header","description":"Where the one control that shows and hides the navigation lives. header: the menu button in the header, in every window class — it opens and closes the navigation over the content where the navigation has no place (or only its column), and where it stands beside the content hides it and shows it again (NVD-106); the default. drawer: the navigation drawer's own menu button (its first header button) collapses and expands it where it has a place, and the header's menu button is shown only where the navigation has none. WHILE the header region is empty the menu button of the menu-button slot is shown as drawer shows it, whatever this says (APS-34)."},{"name":"asideLabel","type":"string","default":"","description":"Names the aside for assistive technology, in the product's language (\"On this page\"). Required where the aside is filled and what it holds does not name itself (a side sheet is named by its headline)."}],"items":[{"name":"menu-button","summary":"The one icon-only Button in the header — or, while the header region is empty, in the menu-button slot — that opens the navigation: a Button of the text variant and the medium size with the menu glyph and no label, unless the product sets otherwise, which the shell shows by menuButtonPlacement and does not restyle.","component":"button","props":[{"name":"label","type":"string","default":"","description":"Its accessible name (\"Menu\"), as the Button's label. Required."}],"slots":[{"name":"icon","description":"Its glyph, as the Button's icon slot. A fixture item's content is this glyph."}],"events":[{"name":"click","description":"The button was activated, as the Button's click. The shell answers it itself (APS-7); a product need not."}]}],"slots":[{"name":"default","description":"The main region: the page's content. A fixture's content string is plain text.","fixture":"text"},{"name":"skip-link","description":"The skip link: a standalone Link whose destination is the main region, with the product's words (\"Skip to content\"). More than one may be given (\"Skip to navigation\"); each is shown while it has focus.","fixture":"text"},{"name":"announcement","description":"The notice above the header: a callout the product places, drawn across the frame's width.","fixture":"text"},{"name":"header","description":"The header: the product's app bar, with its search and its actions, and the menu button in its navigation slot.","fixture":"text"},{"name":"menu-button","description":"The menu button of a frame whose header region is empty: the menu-button item, which the shell places alone in the header's place and keeps at the top of the window (APS-34). Not shown while the header region holds something, where the menu button belongs in the header. A fixture gives it as its menu-button item, not as a string."},{"name":"navigation","description":"The navigation: a navigation drawer, which draws each of the three presentations itself. Anything else is placed beside the content where the navigation has a place and is not shown where it has none.","fixture":"text"},{"name":"aside","description":"The aside: the product's supporting content, or a side sheet.","fixture":"text"},{"name":"footer","description":"The footer: the product's own layout of links, a legal line and controls. The shell gives it a place and an inset and no anatomy.","fixture":"text"},{"name":"navigation-bar","description":"A navigation bar for the bottom edge of a narrow window.","fixture":"text"}],"events":[{"name":"windowClassChange","description":"The shell decided the window's class for the first time, or the window's width changed it; carries compact, medium or expanded. A product switches what follows the class and has no setting of its own for it: a search's presentation, a side sheet's variant, the form of an outline."},{"name":"navigationOpenChange","description":"The navigation asks to be presented over the content or to be put away: the menu button was activated while it was closed (true), or the open navigation closed — by its scrim, Escape, the platform's back, a drag, a destination that was activated, the menu button (false); and beside the content, the menu button hid a navigation that was open (false) or showed it again (true). A change of the window's class emits none. Carries the value asked for."}],"states":["enabled"],"behavior":[{"id":"APS-1","text":"THE app shell SHALL fill the window with comp.app-shell.container.color, hand everything it holds comp.app-shell.content.color as the platform's inherited foreground, and place its regions in this order: the announcement across the top; the header across the top below it (WHILE the header region is empty, the menu button of the menu-button slot alone in its place, APS-34); then a row that holds the navigation at the start edge, the main region, and the aside at the end edge; the footer across the bottom of the page; and the navigation bar across the bottom edge of the window. A region that holds nothing, and the footer WHILE footerHidden is true (APS-31), SHALL take no space, draw nothing and add no landmark, and the regions beside it SHALL take its room. THE app shell SHALL draw no elevation and no corner of its own."},{"id":"APS-2","text":"THE app shell SHALL give the window one of three classes by its width alone: compact WHILE the window is narrower than comp.app-shell.breakpoint.medium, medium WHILE it is at least that wide and narrower than comp.app-shell.breakpoint.expanded, and expanded WHILE it is at least comp.app-shell.breakpoint.expanded wide. It SHALL derive the class anew whenever the width changes, SHALL never store it, and SHALL NOT read the window's height, the device, the pointer or the orientation for it. WHERE the platform measures a window in a unit that grows with the reader's text size (the web's rem) the two widths SHALL be compared in that unit, so that enlarged text moves the frame to a narrower class before its columns become too narrow to read."},{"id":"APS-3","text":"WHEN the app shell first decides the window's class, and WHEN a change of the window's width changes it, THE app shell SHALL emit windowClassChange exactly once with the class, and SHALL make the present class known to everything it holds through the platform's own channel for inherited values, so that a component inside it can follow the class without measuring the window itself. A change of width inside one class SHALL emit nothing."},{"id":"APS-4","text":"THE app shell SHALL choose how the navigation is presented from the window's class: WHILE the class is expanded, beside the main region in the form the navigation drawer's expanded gives it (the standard presentation, NVD-53: its full form, its collapsed form, or — for a drawer a person hid there with the menu button, NVD-106 — no place at all, the main region taking its room); WHILE it is medium and what the navigation region holds has a collapsed form (a collapsible navigation drawer), as that collapsed form beside the main region, widening over the content WHILE navigationOpen is true (the column presentation); and otherwise with no place in the layout, presented over the content WHILE navigationOpen is true (the modal presentation). WHILE the header region holds something, the navigation presented over the content — in the column and in the modal presentation alike — SHALL be drawn inside the frame below the header, from the header's bottom edge (from the window's top edge WHILE a static header has scrolled out of view) to the window's bottom edge, and its scrim SHALL cover only that part of the frame, so that the header is never covered or dimmed (APS-7, APS-32); WHILE the header region is empty it SHALL be drawn as APS-34 says. A navigation drawer in the region SHALL be drawn in each presentation exactly as a responsive drawer draws it (NVD-53 to NVD-55), and the two SHALL never disagree, because comp.app-shell.breakpoint.medium and comp.app-shell.breakpoint.expanded and the two widths that drawer reads alias the same window classes of the system (sys.breakpoint.medium, sys.breakpoint.expanded). WHILE the presentation is modal and the region holds something that cannot present itself over the content THE app shell SHALL NOT show it, SHALL keep it from focus and from assistive technology, and in debug builds SHALL report that the navigation of a narrow window needs a navigation drawer."},{"id":"APS-5","text":"WHILE the navigation has a place in the layout THE app shell SHALL put it at the start edge of the row, as wide as what it holds draws itself (a navigation drawer's width in its present form) and never wider than the room the row leaves it — the window (its width as the page has it: less a scrollbar that takes room in it) less the main region's least width (its start and end insets, APS-8, and sys.target.touch between them) and less the aside WHILE the aside stands beside the main region (APS-9: comp.app-shell.aside.width, or a side sheet's own width as it is drawn, APS-10) — even where what it holds asks for more (a navigation drawer's least width included, NVD-97), so that neither the main region nor the aside is pushed past the window's end and the page never scrolls sideways (WCAG 1.4.10); THE app shell SHALL give the main region all the room that is left, and SHALL add no padding, fill or edge to it. WHEN that room changes (the window's width, an aside added or removed, a side sheet sliding in or out) the navigation SHALL be held to it in every frame it is drawn, with no motion of its own beyond what changes the room. WHILE scroll is page THE app shell SHALL keep the navigation in view while the page scrolls — from below the header WHILE the header is sticky, from below the menu button WHILE a frame without a header shows it (APS-34), else from the top of the window, to the window's bottom edge — and what it holds SHALL scroll inside that height by itself (NVD-61), never the page with it. WHEN the window's scrolling view is pulled past its start or its end (the platform's overscroll) the navigation SHALL stay where it is: only the page's content moves with the pull. WHILE a person changes the width of a navigation drawer the navigation holds (NVD-98 to NVD-101) THE app shell SHALL give the main region the room that is left in every frame the width changes, the main region moving with no motion of its own, and SHALL keep the reader at the same place in the main content as far as the new width allows, as APS-23 does when the class changes."},{"id":"APS-6","text":"WHILE menuButtonPlacement is header and the navigation region holds a navigation drawer THE app shell SHALL show the menu button where the product put it in the header in every window class and every presentation, whether the navigation is open or not. WHILE menuButtonPlacement is drawer THE app shell SHALL show it only WHILE the presentation is modal, and WHILE it is standard and the drawer is responsive and either has no collapsed form, whether it is shown or hidden, or is hidden there (NVD-106): a drawer with no collapsed form has no menu button of its own (NVD-37), so the control that shows it SHALL stay to hide it again, in the same place, and the control that hid a drawer SHALL stay to show it again; in the column presentation, and in the standard one for a collapsible drawer that is shown, the drawer's own menu button (NVD-37) stands for it. WHEN an activation of the menu button shows or hides a drawer beside the content THE app shell SHALL leave focus on the menu button, which stays where it is. WHERE that activation shows a collapsible drawer again and so takes the menu button away (WHILE menuButtonPlacement is drawer, or the header region is empty), THE app shell SHALL move focus that was on it to the drawer's own menu button (NVD-37), or else to the main region. WHILE the header region is empty THE app shell SHALL show the menu button of the menu-button slot as APS-34 says, whatever menuButtonPlacement says. WHILE the navigation region holds something other than a navigation drawer THE app shell SHALL show the menu button only WHILE the presentation is modal, where APS-4 reports it. WHILE the navigation region is empty, and wherever this sentence does not show it, THE app shell SHALL NOT show the menu button, SHALL keep it from focus and from assistive technology, and SHALL give its place to what is beside it. WHEN menuButtonPlacement names a value the app shell does not define it SHALL be treated as header. THE app shell SHALL NOT restyle the menu button: it SHALL render as the icon-only Button it is, from its own tokens, with its own press, focus ring and minimum target, and its glyph SHALL stay the same while the navigation is open — its expanded state, not its picture, tells that it is."},{"id":"APS-7","text":"WHEN the menu button is activated THE app shell SHALL ask the navigation drawer in the navigation region for what the drawer's own menu button asks (NVD-37), in every presentation: WHILE the presentation is standard, to hide the navigation where it is shown there and to show it again where it is hidden (NVD-106), whatever its form — the drawer applies it and reports it with standardHiddenChange, and THE app shell SHALL emit navigationOpenChange exactly once WHERE navigationOpen changes with it (false as a drawer that was open is hidden, true as one is shown) and make navigationOpen follow the drawer's open; the main region SHALL take the room the hidden navigation leaves, the drawer's slide resizing it, and nothing SHALL be made inert; WHILE it is column or modal and navigationOpen is false, to open — THE app shell SHALL then emit navigationOpenChange exactly once with true and become open (by setting navigationOpen itself on the web, through its binding where navigationOpen is one, and by the product setting it elsewhere), and the drawer SHALL present itself over the content below the header (APS-4, NVD-19) — over the whole window WHILE the header region is empty (APS-34) — taking focus; and WHILE navigationOpen is true, to close (NVD-20). WHILE the navigation is open over the content below the header THE app shell SHALL keep the announcement and the header as they are — drawn, reachable by pointer and keyboard and exposed to assistive technology, never inert — and SHALL make every other region inert to pointer, touch, keyboard and assistive technology (the skip link, the main region, the aside, the footer and the navigation bar), keeping the page from scrolling under the scrim as a modal layer does (MDL-2). WHEN the open navigation begins to close (NVD-20, NVD-21) THE app shell SHALL at once emit navigationOpenChange exactly once with false, navigationOpen SHALL become false the same way, and the regions it made inert SHALL stop being inert; focus moves as NVD-22 says, to the menu button where the menu button opened the navigation; its scrim is taken away at once (MOT-8), the drawer then leaves by its motion, and nothing SHALL change when that motion ends (NVD-22). THE app shell SHALL expose the menu button as expanded WHILE the navigation is open over the content, and in the standard presentation WHILE the drawer is shown there in either form, and as collapsed otherwise, controlling the navigation WHILE the navigation is shown — open over the content, or standing beside it in either form — and naming nothing WHILE it is not shown (modal and closed, or hidden beside the content), so that the button never names an element that is not exposed. WHEN the menu button hides or shows the navigation beside the content, focus SHALL stay on it (APS-6), and focus that was in the drawer SHALL move to it (NVD-106). A change of the window's class SHALL NOT change navigationOpen and SHALL emit no navigationOpenChange; WHILE the navigation stands beside the content and navigationOpen is true THE app shell SHALL make nothing inert, and WHEN the navigation is presented over the content again WHILE navigationOpen is true it SHALL make the regions under the scrim inert as an opening does (NVD-54 moves focus)."},{"id":"APS-8","text":"THE app shell SHALL inset the main region's content from the region's start and end by the gutter of the window's class — comp.app-shell.gutter.compact, comp.app-shell.gutter.medium or comp.app-shell.gutter.expanded — and from its top and bottom by comp.app-shell.main.padding-block, except, WHILE scroll is page, on a side where an aside stands above or below it, where the two share comp.app-shell.aside.gap instead (APS-9). WHILE mainWidth is contained the content SHALL be no wider than comp.app-shell.main.max-width and SHALL be centred in the room the region has inside its gutters; WHILE mainWidth is full it SHALL take all of that room. THE main region SHALL never be wider than the room the row leaves it: content that cannot shrink (a table, a line of code) SHALL scroll inside its own box (PRS-15), and SHALL NOT widen the frame or make the page scroll sideways. WHILE the navigation region holds a navigation drawer that draws its resize handle beside its end edge (NVD-96) THE app shell SHALL inset the content of the main region, and of an aside stacked in its column, from the region's start by the greater of the gutter and the handle's target across that edge (sys.target.pointer for a fine pointer, sys.target.touch for touch or where the input type cannot be told, HDL-5), so that the target lies over that inset alone and a press meant for the main content never reaches the handle (WCAG 2.5.8); WHILE the drawer draws no handle (resizable false, or the drawer not beside the content) the gutter alone SHALL inset it."},{"id":"APS-9","text":"WHILE the window's class is expanded THE app shell SHALL place the aside beside the main region at the end edge of the row, comp.app-shell.aside.width wide, its content inset by comp.app-shell.aside.padding-inline at the start and the end and by comp.app-shell.main.padding-block at the top and the bottom, so that its first line stands level with the main content's; WHILE scroll is page it SHALL keep the aside in view while the page scrolls, as APS-5 says of the navigation, and the aside SHALL scroll inside that height by itself when its content is taller, and SHALL stay where it is WHEN the window's scrolling view is pulled past its start or its end. WHILE the class is medium or compact THE app shell SHALL place the aside in the main region's column, with the main region's gutters and, WHILE mainWidth is contained, its width and centring: above the main content WHILE asideOrder is before and below it WHILE asideOrder is after, comp.app-shell.aside.gap from it, scrolling with it. WHILE scroll is page that space SHALL take the place of the main region's inset on that side (APS-8) and SHALL be shared by the two regions, which meet in its middle, where the line of APS-18 stands: neither region's box SHALL reach into the other's, so that a press, a fill the product gives the main region and the outline assistive technology draws around a landmark keep to their own region."},{"id":"APS-10","text":"WHERE the aside holds a component that takes its own width in the layout and draws its own edge (a standard side sheet, SSH-1 and SSH-7) THE app shell SHALL give the aside that component's width in place of comp.app-shell.aside.width, SHALL add no inset to it and SHALL draw no edge beside it; WHERE it holds a component that presents itself over the content (a modal side sheet) the aside SHALL take no space in any class. THE app shell SHALL NOT change the variant of what the aside holds: a product that wants a sheet beside the content in an expanded window and over it in a narrower one sets the sheet's variant from windowClassChange."},{"id":"APS-11","text":"WHILE scroll is page THE app shell SHALL place the footer after the row of the navigation, the main region and the aside, across the frame's whole width, so that it is reached at the end of the page and the navigation and the aside stop staying in view where it begins; WHILE scroll is main THE app shell SHALL keep the footer at the bottom of the frame, below the row and above the navigation bar, always in view. THE app shell SHALL inset the footer's content by the gutter of the window's class (APS-8) at the start and the end and by comp.app-shell.footer.padding-block at the top and the bottom, and SHALL lay out nothing inside it: the footer's columns, links and controls are the product's."},{"id":"APS-31","text":"WHILE footerHidden is true THE app shell SHALL NOT show the footer, whatever the footer slot holds: the footer SHALL take no space, draw no line (APS-18), add no landmark (APS-21) and have no stop in focus order (APS-22), the regions beside it SHALL take its room, and WHILE scroll is page the navigation and the aside SHALL stay in view to the end of the page (APS-5, APS-9). WHILE footerHidden is false THE app shell SHALL show the footer exactly while the product fills the footer slot (APS-1, APS-11): it SHALL NOT draw a footer, or expose a content-information landmark, for a slot the product left unfilled. WHEN footerHidden changes THE app shell SHALL draw the new arrangement at once, without a motion of its own, SHALL keep what the footer slot holds as the product gave it, and IF keyboard focus is in the footer as it is hidden SHALL move focus to the main region."},{"id":"APS-32","text":"THE app shell SHALL draw each region in a stacking order of its own, so that nothing a region holds — whatever level its own stacking order (a z-index) gives it — is drawn over another region: WHILE scroll is page THE app shell SHALL draw the header and the navigation bar over every other region, the footer included, while the page scrolls under them, and SHALL draw the footer over the navigation and the aside. WHILE the navigation is presented over the content below the header (APS-4, APS-7) THE app shell SHALL draw the navigation and its scrim over the main region, the aside, the footer and the navigation bar and under the announcement and the header, within the frame's own stacking order and not in the platform's layer for overlays, so that the header is never covered or dimmed. WHILE the skip link has keyboard focus THE app shell SHALL draw it over every region (APS-19). THE app shell SHALL itself be one stacking order within the page, so that no level of its parts competes with what the product draws outside the frame. What stands over the whole frame — a menu, a popover, a tooltip, a snackbar, a dialog, a sheet, a modal drawer the app shell does not hold — SHALL be drawn above it by the platform's own layer for overlays, never by a level within a region."},{"id":"APS-12","text":"WHILE the announcement region holds something THE app shell SHALL place it across the frame's whole width above the header, with no inset of its own, in every class; WHILE scroll is page the announcement SHALL scroll away with the page and a sticky header SHALL then rest at the top of the window, and WHILE scroll is main it SHALL stay above the header. WHEN what the announcement holds is removed or closes (a callout whose open becomes false) THE app shell SHALL give its room back at once."},{"id":"APS-13","text":"WHILE the window's class is compact and the navigation-bar region holds something THE app shell SHALL keep it at the bottom edge of the window across the frame's whole width, over the bottom system inset as the bar itself lays out (NVB-18), in view while the page scrolls, and SHALL end the page, or the frame, above it so that nothing is covered by it; WHILE the class is medium or expanded THE app shell SHALL NOT show the navigation-bar region, SHALL keep it from focus and from assistive technology, and SHALL give it no space. THE app shell SHALL NOT choose between the bar and the navigation for the product: a product whose bar is its navigation in a compact window gives no menu button."},{"id":"APS-14","text":"WHILE scroll is page THE app shell SHALL be at least as tall as the window and as tall as its content, SHALL let the window's own scrolling view scroll the page, and SHALL make no region a scrolling view except the navigation and the aside where APS-5 and APS-9 keep them in view; so that the platform's find-in-page, a link to a place in the page, the return to where the reader was, and a browser's collapsing bars work as they do on a page without a shell."},{"id":"APS-15","text":"WHILE scroll is main THE app shell SHALL be exactly as tall as the window, less the on-screen keyboard where one covers it, SHALL keep the announcement, the header, the footer and the navigation bar in place, and SHALL make the main region the one scrolling view of the frame, reachable and scrollable from the keyboard, with the aside scrolling inside its own height WHILE it is beside the main region and with the main region WHILE it is above or below it. THE window itself SHALL NOT scroll."},{"id":"APS-16","text":"WHILE scroll is page and headerPosition is sticky THE app shell SHALL keep the header at the top of the window, above the main region, the navigation and the aside, while the page scrolls under it, and SHALL keep it there WHEN the window's scrolling view is pulled past its start or its end (the platform's overscroll): the content moves with the pull and the header does not; WHILE headerPosition is static the header SHALL scroll away with the page. THE app shell SHALL NOT fill, raise or edge the header: an app bar in it draws its own scrolled condition from the scrolling view it is connected to (APB-9), which is the window WHILE scroll is page and the main region WHILE scroll is main."},{"id":"APS-17","text":"THE app shell SHALL hold the height of what it keeps over the top of the scrolling view — a sticky header's present height, measured again whenever the header changes size, and nothing WHILE headerPosition is static — and SHALL make it known to the scrolling view and to everything it holds, so that a heading or any other place a link or the address moves the view to (PRS-23), and an element that takes keyboard focus, come to rest below the header and never under it; likewise for the navigation bar's height at the bottom; WHILE scroll is main nothing stands over the scrolling view, and those distances are nothing. THE app shell SHALL also make known, whatever scroll is, to what is drawn over the page (a snackbar, SNK-13, SNK-35) how far it reaches over the top of the window — to the bottom edge of the header, or of the menu button of a frame without a header, WHILE that stays in view (WHILE scroll is main it never moves, below an announcement too) — and over its bottom (the navigation bar's height WHILE the bar is shown), so that such a surface stands clear of them. A heading's own space before it (PRS-6) is added to that distance by the prose, not by the shell."},{"id":"APS-18","text":"WHILE separation is auto THE app shell SHALL part its regions as comp.app-shell.separation names, and WHILE separation is divider or gap as that value says, whatever the token says: divider draws a line comp.app-shell.outline.width thick in comp.app-shell.outline.color along the footer's top edge, along the start edge of an aside that stands beside the main region, and between the main content and an aside that stands above or below it, in the middle of comp.app-shell.aside.gap; gap draws no line and leaves the same spaces. The lines SHALL take no room of their own. THE app shell SHALL draw no line beside a region whose component draws its own edge (APS-10, APS-16) and none around the navigation, the announcement or the navigation bar. WHEN separation names a value the app shell does not define it SHALL be treated as auto."},{"id":"APS-19","text":"WHILE the skip-link region holds a Link THE app shell SHALL make it the first element the keyboard reaches in the frame, before the announcement and the header, SHALL draw nothing of it while it does not have keyboard focus and still keep it in the focus order and exposed to assistive technology, and WHILE it has keyboard focus SHALL draw it comp.app-shell.skip-link.offset from the top and the start edges of the window, inside the system insets, above every region and every sticky part: in a box filled with comp.app-shell.skip-link.container.color and raised by comp.app-shell.skip-link.container.elevation, with corners comp.app-shell.skip-link.container.shape eased by sys.shape.corner-smoothing, padded by comp.app-shell.skip-link.container.padding-inline and comp.app-shell.skip-link.container.padding-block, its text in comp.app-shell.skip-link.label.typescale; the Link SHALL keep its own color, underline, focus ring and states (LNK-1). The box SHALL appear and go at once, without motion, and SHALL move no other part of the frame."},{"id":"APS-20","text":"WHEN the skip link is followed THE app shell SHALL move keyboard focus to the main region itself — not to the first control in it — and bring the region's top into view below the header (APS-17) at once, without a scrolling motion, so that the next Tab reaches the first focusable element of the content and a screen reader starts reading there; the main region SHALL take focus only this way and SHALL NOT be a stop of the Tab order."},{"id":"APS-21","text":"THE app shell SHALL expose each filled region as the landmark it is: the header as the page's banner, the navigation and the navigation bar as what they hold expose (a navigation landmark named by its own label), the main region as the page's one main landmark, the aside as a complementary landmark named by asideLabel (or by what it holds, where that names itself), and the footer as the page's content information; the announcement, the skip link and the menu button of the menu-button slot SHALL add no landmark. IF the frame holds no main region, or more than one, or an aside that has no name, THE app shell SHALL still lay out what it holds, and in debug builds SHALL report it."},{"id":"APS-22","text":"THE app shell SHALL NOT be focusable and SHALL move focus through its regions in reading order, the same in every class and in either layout direction: the skip link, the announcement, the header (WHILE it is empty, the menu button of the menu-button slot, APS-34), the navigation, the aside WHILE asideOrder is before, the main region's content, the aside WHILE asideOrder is after, the footer, the navigation bar. A region that is not shown (APS-4, APS-6, APS-13, APS-31), and WHILE the navigation is open over the content below the header a region the app shell makes inert (APS-7), SHALL have no stop in that order. THE app shell SHALL NOT keep focus inside any region: WHILE the navigation is open over the content below the header, Tab and Shift+Tab SHALL move through the announcement, the header and the navigation in that order and on to what the platform has beyond the frame, and never reach what lies under the scrim. Only an overlay that stands over the whole frame (APS-32) holds focus inside itself."},{"id":"APS-23","text":"WHEN the window's class changes THE app shell SHALL draw the new arrangement of every region but the navigation at once, without a motion of its own, and SHALL let the navigation drawer move from its place in the old presentation to its place in the new one by the drawer's own motion (NVD-54), drawn over the main region where the two overlap while it moves; SHALL keep scroll, headerPosition, mainWidth, asideOrder, footerHidden, separation and menuButtonPlacement as they are, and navigationOpen (APS-7, NVD-54); SHALL keep the reader at the same place in the main content as far as the new arrangement allows; and IF keyboard focus is on something the new arrangement does not show (a navigation bar's destination, a menu button that menuButtonPlacement drawer hides) SHALL move it to the main region, unless the navigation it holds has already moved it (NVD-54). WHERE motion is reduced the navigation SHALL take its new place as MOT-6 says, its change of size at once."},{"id":"APS-24","text":"WHERE the app shell is rendered before the window's width is known or before its own code runs (a page rendered on a server) THE app shell SHALL already be laid out for the window's class by the platform's layout alone — every region in its place, the regions that the class does not show taking no space, the skip link first and working — SHALL present nothing over the content, SHALL make nothing inert, and SHALL emit no event until the class is decided; its own code SHALL then add only what layout cannot: the events, the menu button's opening of the navigation, and the measured distance of APS-17, without moving anything that was already drawn. WHERE a navigation drawer in the navigation region is rendered before its own code runs THE app shell SHALL give it, in an expanded window, the place it will take once its code runs: its expanded width held as NVD-97 holds it (the width the product gave it, between its least and its greatest width); its collapsed column (comp.navigation-drawer.collapsed.container.width.medium, or .compact WHILE density is compact) WHILE it is collapsible and expanded is false or its variant is modal (NVD-30); and no space WHILE it is responsive, standardHidden is true and open is false (NVD-106)."},{"id":"APS-25","text":"WHILE the text size is enlarged THE app shell SHALL keep its gutters and insets, let every region grow with its text, and SHALL need no scrolling in two directions at any width down to 320 points: in a compact window the frame is one column, the main region never narrower than the window less two gutters, and only a block that scrolls in its own box (APS-8) scrolls sideways. THE app shell SHALL NOT fix the height of any region."},{"id":"APS-26","text":"WHERE the platform's forced-colors or increased-contrast mode replaces the product's colors THE app shell SHALL let the system's colors fill its frame, SHALL draw the lines of APS-18 in the system's text color WHILE they are drawn, and SHALL draw an edge comp.app-shell.outline.width thick in the system's text color around the skip link's box, because the mode removes the fill and the elevation that set it apart."},{"id":"APS-27","text":"THE app shell SHALL extend its fill under every system inset (status bar, camera cutout, home indicator, window caption) and SHALL keep the main region's, the aside's and the footer's content inside the start, end and bottom insets; the header, the navigation and the navigation bar lay themselves out over the insets at their own edges (APB-10, NVD-25, NVB-18), and the app shell SHALL NOT inset them a second time."},{"id":"APS-28","text":"THE app shell SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the app shell is shown THE app shell SHALL draw itself for the new direction at once, without a motion of its own, keeping the window's class, navigationOpen and the reader's place in the content. WHERE the layout direction is right-to-left the navigation SHALL stand at the right edge and the aside at the left, the skip link's box at the top right, the menu button where the header puts its start, and the lines of APS-18 on the mirrored edges; the order of APS-22 SHALL NOT change, and nothing a region holds SHALL be mirrored by the shell."},{"id":"APS-29","text":"WHEN scroll, headerPosition, mainWidth or asideOrder names a value the app shell does not define THE app shell SHALL render with that prop's default, and in debug builds report the unknown value."},{"id":"APS-30","text":"THE app shell SHALL NOT restyle, resize or re-order what the product puts in a region beyond the place and the insets this spec gives, SHALL NOT decide which page is shown, follow a link, load anything, remember anything beyond its own lifetime (which page, how far a region was scrolled, whether the navigation was collapsed, how wide a person made it) or set the document's title or language; and SHALL NOT scroll anything with motion: every movement it causes (APS-17, APS-20, APS-23) is at once, whether or not motion is reduced."},{"id":"APS-33","text":"WHILE the navigation region holds a navigation drawer whose filterable is true and whose filterShortcut holds exactly one chord, and either the navigation's presentation is modal and navigationOpen is false or it is standard and the drawer is hidden there (NVD-106), WHEN the person presses that chord anywhere in the window — read as SRC-38 reads a chord and with its exceptions (a press something else has taken, a key repeating while held, an input-method composition and, for a chord without mod, ctrl or alt, focus in an element that takes text) — THE app shell SHALL keep the press from doing anything else, open the navigation as an activation of the menu button does (APS-7: navigationOpenChange with true; where the drawer is hidden beside the content, its standardHidden becoming false), and ask the drawer to focus its filter (NVD-88), so that focus is in the drawer's filter field once it is open. WHILE the drawer is shown — beside the main region, or as its column — the drawer answers the chord itself (NVD-87) and THE app shell SHALL NOT. THE app shell SHALL bind no other key for the navigation."},{"id":"APS-34","text":"WHILE the header region is empty THE app shell SHALL take the menu button from the menu-button slot and SHALL show it only where APS-6 shows the menu button WHILE menuButtonPlacement is drawer, whatever menuButtonPlacement says — WHILE the navigation's presentation is modal, and WHILE it is standard and the drawer is responsive and either has no collapsed form, whether it is shown or hidden, or is hidden there (NVD-106): in the column presentation, and in the standard one for any other navigation, the navigation stands at the start edge from the top of the frame, below the announcement, to the window's bottom edge (APS-5), and a navigation drawer's own menu button (NVD-37) stands for the shell's. WHILE it is shown THE app shell SHALL place the menu button alone in the header's place — below the announcement, at the start edge of the frame — inset from the top of that place and from the frame's start edge by the gutter of the window's class (APS-8) and kept inside the system insets, SHALL draw no band, fill, edge or elevation around it, and SHALL begin the navigation, the main region and the aside below it, so that the button that shows a drawer beside the content stays in the same place, never covered by the drawer, to hide it again. WHILE scroll is page THE app shell SHALL keep the menu button at the top of the window, the gutter from its top edge, while the page scrolls under it — once an announcement above it has scrolled away (APS-12) — whatever headerPosition says, SHALL draw it over every other region as it draws a sticky header (APS-32), and SHALL keep it where it is WHEN the window's scrolling view is pulled past its start or its end (the platform's overscroll): only the content moves with the pull. WHILE scroll is main it SHALL stay in its place above the main region. THE app shell SHALL hold the gutter above the menu button and its height as what it keeps over the top of the scrolling view, as APS-17 holds a sticky header's, so that an anchor's target and a focused element come to rest below it. The menu button SHALL add no landmark and no region (APS-21), SHALL be reached in the header's place in the order of APS-22, and SHALL keep its keys; activating it SHALL open and close the navigation, or show and hide a drawer beside the content, as APS-7 says, focus staying on it where the drawer stands beside the content as APS-6 says. WHILE the navigation is open over the content THE app shell SHALL let the navigation drawer present itself as it does outside a frame that has a header (NVD-19): over the whole window from its top edge to its bottom edge, its scrim over the menu button and every region, keeping focus inside it and making what lies behind it inert while it is open, and returning focus to the menu button when it closes (NVD-22). WHILE the header region holds something THE app shell SHALL NOT show what the menu-button slot holds, SHALL keep it from focus and from assistive technology, and in debug builds SHALL report that the menu button of a frame with a header belongs in the header."}],"accessibility":{"role":"none","keyboard":[{"keys":"Tab / Shift+Tab","action":"Moves through the frame in reading order: the skip link, the announcement, the header (or, while the header region is empty, the menu button of the menu-button slot), the navigation, the main content and the aside in the order asideOrder gives, the footer, the navigation bar. The shell itself is not a stop. While the navigation is open over the content below the header, only the announcement, the header and the navigation have stops; in a frame without a header the open navigation is a modal drawer that keeps focus inside it."},{"keys":"Enter, on the skip link","action":"Moves focus to the main region and brings its top into view below the header."},{"keys":"Enter or Space, on the menu button","action":"Opens the navigation over the content, below the header (over the whole window in a frame without a header, APS-34), and moves focus into it; while it is open, closes it. Where the navigation stands beside the content, hides it and shows it again, the main content taking its room while it is hidden; focus stays on the menu button, which stays where it is. Escape in the open navigation closes it and returns focus to the menu button (the navigation drawer's own keys)."},{"keys":"/ (a filterable drawer's chord, in a narrow window)","action":"Opens the navigation over the content and moves focus to the drawer's filter field (APS-33). Where the drawer is shown, the drawer answers it."}],"labeling":"The shell has no role and no name. Its regions are the page's landmarks: banner (the header), navigation (named by the label of the navigation drawer or the navigation bar it holds), main (exactly one, unnamed), complementary (the aside, named by asideLabel or by the side sheet's headline) and content information (the footer, while it is shown: an unfilled or hidden footer is no landmark). The skip link is named by its own text and the menu button by its label, both in the product's language: Tanrei ships no words.","minimumTarget":true,"notes":["The shell takes no input: the skip link is a Link and the menu button an icon-only Button, and each meets the minimum target by its own spec (LNK-17, BTN-5).","The skip link is what lets a keyboard pass the header and the navigation in one step (WCAG 2.4.1); the landmarks let a screen reader do the same. Both are needed: a sighted keyboard user has no landmark list.","Focus is never hidden by the frame (WCAG 2.4.11): the scrolling view keeps the height of the sticky header and of the navigation bar clear when it brings a focused element into view (APS-17).","While the navigation is open over the content it is drawn below the header and stays the navigation landmark the expanded menu button controls; it is not a modal dialog, because the header stays usable and a dialog would tell assistive technology that everything else is inert. The regions under the scrim are made inert instead, so nothing that cannot be seen can be reached (the disclosure pattern for a site's navigation, with the covered content inert).","Reading order, focus order and the order of the markup are one order in every window class (APS-22), which is why the aside's place is a setting (asideOrder) and not something the layout rearranges by width.","Reflow (WCAG 1.4.10): at 320 points the frame is one column; the widths that decide the class grow with the text on the web (APS-2), so 200 % text in a 1280 window is laid out as a medium one.","A second navigation landmark is not an error: a navigation drawer, a navigation bar, breadcrumbs and a pagination each name themselves, and only one of the drawer and the bar is shown at a time unless the product keeps both.","On SwiftUI, Compose, Flutter and React Native there is no skip link: each platform's assistive technology moves between regions by its own gesture or rotor, and the shell marks the regions for it."]},"tokens":"comp.app-shell","fixtures":[{"id":"expanded","props":{"asideLabel":"On this page"},"content":"Main","slots":{"skip-link":"Skip to content","header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"expanded-main-only","props":{},"content":"Main","slots":{"header":"Header"}},{"id":"expanded-no-aside","props":{},"content":"Main","slots":{"header":"Header","navigation":"Navigation","footer":"Footer"}},{"id":"expanded-footer-hidden","props":{"footerHidden":true,"asideLabel":"On this page"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"}},{"id":"expanded-no-navigation","props":{"asideLabel":"On this page"},"content":"Main","slots":{"header":"Header","aside":"Aside","footer":"Footer"}},{"id":"expanded-no-header","props":{"asideLabel":"On this page"},"content":"Main","slots":{"navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"expanded-announcement","props":{"asideLabel":"On this page"},"content":"Main","slots":{"announcement":"Announcement","header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"}},{"id":"expanded-full","props":{"mainWidth":"full"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","footer":"Footer"}},{"id":"expanded-divider","props":{"separation":"divider","asideLabel":"On this page"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"}},{"id":"expanded-gap","props":{"separation":"gap","asideLabel":"On this page"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"}},{"id":"expanded-scroll-main","props":{"scroll":"main","asideLabel":"Details"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"}},{"id":"expanded-rtl","props":{"asideLabel":"في هذه الصفحة"},"content":"المحتوى","slots":{"header":"الترويسة","navigation":"التنقل","aside":"جانبي","footer":"التذييل"},"direction":"rtl"},{"id":"medium","props":{"asideLabel":"Related"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"medium-aside-before","props":{"asideOrder":"before","asideLabel":"On this page"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"compact","props":{"asideLabel":"Related"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"compact-aside-before","props":{"asideOrder":"before","asideLabel":"On this page"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"compact-announcement","props":{},"content":"Main","slots":{"announcement":"Announcement","header":"Header","navigation":"Navigation","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"compact-navigation-bar","props":{},"content":"Main","slots":{"header":"Header","navigation":"Navigation","footer":"Footer","navigation-bar":"Navigation bar"}},{"id":"compact-no-header","props":{"asideLabel":"Related"},"content":"Main","slots":{"navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]},{"id":"compact-scroll-main","props":{"scroll":"main"},"content":"Main","slots":{"header":"Header","navigation":"Navigation","footer":"Footer","navigation-bar":"Navigation bar"}},{"id":"compact-rtl","props":{"asideOrder":"before","asideLabel":"في هذه الصفحة"},"content":"المحتوى","slots":{"header":"الترويسة","navigation":"التنقل","aside":"جانبي","footer":"التذييل"},"items":[{"kind":"menu-button","props":{"label":"القائمة"},"content":"menu"}],"direction":"rtl"},{"id":"compact-narrowest","props":{"asideLabel":"Related"},"content":"Main","slots":{"announcement":"Announcement","header":"Header","navigation":"Navigation","aside":"Aside","footer":"Footer"},"items":[{"kind":"menu-button","props":{"label":"Menu"},"content":"menu"}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-app-shell","props":{"scroll":"scroll","headerPosition":"headerPosition","mainWidth":"mainWidth","asideOrder":"asideOrder","footerHidden":"footerHidden","separation":"separation","navigationOpen":"navigationOpen","menuButtonPlacement":"menuButtonPlacement","asideLabel":"asideLabel"},"events":{"windowClassChange":"windowclasschange","navigationOpenChange":"navigationopenchange"},"items":{"menu-button":{"name":"tanrei-button","props":{"label":"label"},"events":{"click":"click"},"notes":"An icon-only `<tanrei-button>` anywhere inside the header region, marked with the `data-app-shell-menu` attribute: usually the app bar's `slot=\"navigation\"` child. In a frame with no header region, the element's own child `<tanrei-button slot=\"menu-button\">` (APS-34): the slot is its mark. The glyph is its content."}},"notes":"An element and a stylesheet: `<tanrei-app-shell>` attaches no shadow root, and the package's `@tanrei/web/app-shell.css` lays out its light-DOM children from the element's name, its attributes and each child's `slot` attribute alone, so a page rendered on a server is laid out before the element is defined and with scripts off (APS-24). The regions are the product's own semantic elements: `<a class=\"tanrei-link\" data-standalone slot=\"skip-link\" href=\"#main\">`, `<div slot=\"announcement\">`, `<header slot=\"header\">` around a `<tanrei-app-bar>`, `<tanrei-navigation-drawer slot=\"navigation\" responsive>`, the one `<main id=\"main\" tabindex=\"-1\">` child without a `slot` (the default region), `<aside slot=\"aside\" aria-label=\"…\">`, `<footer slot=\"footer\">` and `<tanrei-navigation-bar slot=\"navigation-bar\">` (and, in a frame without a header, `<tanrei-button slot=\"menu-button\">` in the header's place), written in the order of APS-22; the stylesheet places them on a grid by name and never reorders focus. Attributes: `scroll`, `header-position`, `main-width`, `aside-order`, `footer-hidden`, `separation`, `navigation-open`, `menu-button-placement`, `aside-label`. The window's class is chosen by `@media` conditions in `rem`; a custom property cannot stand in a media condition, so the generator writes the two widths into the stylesheet from the active system's tokens (one stylesheet per system that changes them). The menu button is shown at every width while `menu-button-placement` is `header` (the default) and the navigation region holds a `<tanrei-navigation-drawer>`; otherwise it is hidden by the same conditions, with `:has(> [slot=\"navigation\"][collapsible])` telling the column presentation from the modal one, and shown again in an expanded window while `:has(> tanrei-navigation-drawer[slot=\"navigation\"][responsive]:is(:not([collapsible]), [standard-hidden]:not([open])))` finds a drawer with no collapsed form, shown or hidden, or one a person hid beside the content (APS-6, NVD-106). With no header region the menu button of the `menu-button` slot is shown by the same conditions as for `menu-button-placement=\"drawer\"` (APS-34), stands in the header's grid row with `justify-self: start`, and is `position: sticky` at the class's gutter (plus `env(safe-area-inset-top)`) from the top, with a block-start margin of the same so that it rests where it sticks, at `z-index: 3` as the header; the element measures it and publishes that margin and its height as the scroll offset (APS-17). A `menu-button` child of a frame that has a header is `display: none`, and the element reports it in debug builds. The drawer of a frame without a header is not held by it (NVD-19): it is the top-layer modal `<dialog>` over the whole window. The parts that stay in view while the page scrolls — the header while `header-position` is `sticky`, the menu button of a frame without a header, the navigation and the aside — are `position: sticky`; the web does not yet follow the part of APS-5, APS-9, APS-16 and APS-34 that keeps them where they are when the document's scroller is pulled past an end: a browser moves a sticky box that is not stuck with the pull, and holds only a `position: fixed` one still, and the fixed boxes would need the header to rest below an announcement until the page has scrolled past it and the navigation and the aside to end where the footer begins, which takes positioning that follows the scroll (scroll-driven animations are not in every engine, and the element listens to no scroll). The frame and each region are `isolation: isolate` (APS-32); the footer and the navigation bar are `z-index: 1` (the bar comes after the footer, so over it), a navigation drawer that stands over the content — open over it below the header, closing, or moving to a new presentation (the drawer's `data-over` state attribute) — `2`, the header `3` and the focused skip link `4` — levels within the frame, which no z-index inside a region reaches; a navigation drawer that draws its resize handle carries the `data-resize` state attribute, and while the frame holds one (`:has()`, asked of the frame) the main region's start padding and a stacked aside's start margin are at least sys.target.pointer, or sys.target.touch under `(pointer: coarse)` — the drawer's own condition for its handle's target — and, before the drawer is defined, in an expanded window the stylesheet reads the same from its attributes alone (`resizable` not `\"false\"`, no `variant=\"modal\"`, and not a responsive drawer written `standard-hidden` without `open`) (APS-8, APS-24); the navigation and the aside are `align-self: start` with a maximum block size of the dynamic viewport height less the scroll offset and `overflow: auto` with `overscroll-behavior: contain`; once the element is defined, a non-passive `wheel` listener on each of them (on the navigation where it is not a navigation drawer, which keeps its own) cancels a wheel turned toward an end the region already stands at, since Gecko keeps to `contain` only within one wheel transaction and would give a wheel at the end after a pause to the page. `scroll=\"main\"` makes the host `100dvh` high and the `<main>` the scroller. It does not yet follow the part of APS-15 that has an aside above or below the main region scroll with it: a stylesheet cannot make the `<main>` and its sibling `<aside slot=\"aside\">` one scrolling view, and making the frame itself the scroller in that arrangement would take the scrolling view away from the `<main>` that the app bar's `scroll-target` (APS-16) and the skip link (APS-17, APS-20) name, and would need the announcement's and the navigation bar's heights before the element is defined (APS-24). Until it does, a product that uses `scroll=\"main\"` and wants the aside to scroll with the content in a compact or medium window writes that content inside the `<main>` for those classes. The stylesheet defines `--tanrei-app-shell-scroll-offset` on the document's root (until the element is defined: the small app bar's height while the header is sticky, else 0) and sets the root's `scroll-padding-block-start` from it — or the main element's while `scroll` is `main`; once defined, the element measures the header with a `ResizeObserver` and rewrites the property. The product's own sticky parts (a table's header row) read the same property. What the frame keeps over the window, whatever scrolls (APS-17), is `--tanrei-app-shell-window-inset-top` and `--tanrei-app-shell-window-inset-bottom` on the document's root: while the page scrolls, the scroll offsets' values; while `scroll` is `main`, the header's (or the menu button's) bottom edge measured from the frame's top (the element watches the announcement's size too) and the navigation bar's height while it is shown. What is drawn over the page reads them (the snackbar host, SNK-13, SNK-35); the stylesheet sets them, until the element is defined, to the small app bar's height while a header stays in view and the navigation bar's in a compact window, as it sets the scroll offset. The scroll offsets are not those: a product's sticky part inside the `<main>` that scrolls has nothing over it. `--tanrei-prose-scroll-offset` stays 0 inside a shell: the scroll padding already clears the header, and prose adds only a heading's own space. The upgraded element adds: the read-only `windowClass` property, reflected as the `data-window-class` state attribute, and `windowclasschange` with `detail.windowClass`, from two `matchMedia` listeners (no resize listener and no frame loop); the menu button's `click`, which asks the `<tanrei-navigation-drawer>` in the navigation region for what its own menu button asks (NVD-37) — hidden or shown again where it stands beside the content (`standardHidden` and `open`, NVD-106), `open` where it is a column or not shown, closing where it is open — sets `navigationOpen` from the drawer's `open`, follows that drawer's `close`, and writes `aria-expanded` and `aria-controls` through the Button's element properties; `role` and `aria-label` on a region whose element does not already give the landmark (a `<tanrei-app-bar slot=\"header\">` with no `<header>` around it; an aside without a name takes `aside-label`); `tabindex=\"-1\"` on a `<main>` that lacks it; and the debug reports of APS-4, APS-21 and APS-29. It listens to nothing while no region needs it. With `scroll=\"main\"` the product names the main element's id in the app bar's `scroll-target`. `footer-hidden` gives the footer region `display: none` from the stylesheet (with `!important`, so a product's own `display` on its `<footer>` cannot bring it back): it then has no box, no landmark and no focus stop, its measured height is 0, and the element moves focus that was inside it to the main region. The skip link is hidden with a clip, never `display: none`, and shown on `:focus-visible`; under `forced-colors: active` its box gains a `CanvasText` border. Insets are `env(safe-area-inset-*)`. A filterable drawer’s chord (APS-33): the element holds one `keydown` listener on the window while the navigation’s presentation is modal and `navigationOpen` is false, or the drawer is hidden beside the content, and the drawer in the navigation region is `filterable` with exactly one chord in `filterShortcut` (read as the drawer reads it); the chord opens the navigation as the menu button does and then calls the drawer’s `focusFilter()`. The React wrapper renders the same light DOM on a server. The navigation open over the content (APS-4, APS-7): with a filled header, the drawer is not shown as a top-layer modal `<dialog>` but drawn in the frame's own stacking order, below the header and over every other region, with its scrim covering only the frame below the header; the element sets `inert` on the skip link, the `<main>`, the aside, the footer and the navigation bar while it is open, holds the page's scroll as a modal layer does, and removes both when closing begins. The drawer learns that it is held so from its parent (a `<tanrei-app-shell>` whose header slot is filled), with no attribute for the product to write. Before a `<tanrei-navigation-drawer>` in the navigation region is defined (APS-24), the stylesheet places it from its attributes alone, in `:not(:defined)` rules under the same `@media` conditions: `collapsible`, `expanded=\"false\"`, `variant=\"modal\"`, `density=\"compact\"`, `responsive`, `standard-hidden` and `open` choose its column, its width or no space, and its width beside the content is `--tanrei-navigation-drawer-width`, which the product writes beside `width` (a stylesheet cannot read a number attribute as a length in every engine), held between comp.navigation-drawer.container.min-width and .max-width; `min-width` and `max-width` are read once the drawer is defined."},"swiftui":{"status":"planned","name":"TanreiAppShell","props":{"scroll":"scroll","headerPosition":"headerPosition","mainWidth":"mainWidth","asideOrder":"asideOrder","footerHidden":"isFooterHidden","separation":"separation","navigationOpen":"isNavigationPresented","menuButtonPlacement":"menuButtonPlacement","asideLabel":"asideLabel"},"events":{"windowClassChange":"onWindowClassChange","navigationOpenChange":"isNavigationPresented"},"items":{"menu-button":{"name":"TanreiButton","props":{"label":"label"},"events":{"click":"action"},"notes":"An icon-only `TanreiButton` in the header, marked `.tanreiAppShellMenuButton()`; the shell reads the mark from the environment and hides the button outside the modal presentation."}},"notes":"`TanreiAppShell(scroll:, headerPosition:, mainWidth:, asideOrder:, isFooterHidden:, separation:, isNavigationPresented: Binding<Bool>, asideLabel:) { main } header: { … } navigation: { … } aside: { … } footer: { … } announcement: { … } navigationBar: { … }`. A layout of its own, not `NavigationSplitView`, whose column widths and collapsing cannot be set from the tokens. The window's class comes from the width of the scene (a `GeometryReader` at the root, in points; Dynamic Type does not change it) and is published as the environment value `\\.tanreiWindowClass`, which a search or a side sheet inside the shell reads. `scroll: .page` is one `ScrollView` holding the announcement, the main content, a stacked aside and the footer, with the header in `.safeAreaInset(edge: .top)` and the navigation and the aside beside it; `.main` keeps the footer in `.safeAreaInset(edge: .bottom)`. The header's height is published as `\\.tanreiAppShellScrollOffset` and applied as the scroll view's content margin, so `ScrollViewReader.scrollTo` rests below it. Regions are exposed with `accessibilityElement(children: .contain)` and one entry each in a custom rotor, the aside labelled by `asideLabel`. No skip link: VoiceOver's rotor and Full Keyboard Access's group navigation move between regions. The navigation open over the content is laid out by the shell itself below the header — not as `.sheet` or a full-screen overlay, which would cover the header's `.safeAreaInset(edge: .top)` — as a scrim and the drawer in a `ZStack` over the content area; the covered regions are `.accessibilityHidden(true)` and kept from focus while it is open, the header is untouched, and the drawer is a container named by its label, not `.isModal`, since the header stays reachable."},"compose":{"status":"planned","name":"TanreiAppShell","props":{"scroll":"scroll","headerPosition":"headerPosition","mainWidth":"mainWidth","asideOrder":"asideOrder","footerHidden":"footerHidden","separation":"separation","navigationOpen":"navigationOpen","menuButtonPlacement":"menuButtonPlacement","asideLabel":"asideLabel"},"events":{"windowClassChange":"onWindowClassChange","navigationOpenChange":"onNavigationOpenChange"},"items":{"menu-button":{"name":"TanreiButton","props":{"label":"contentDescription"},"events":{"click":"onClick"},"notes":"An icon-only `TanreiButton` in the header with `Modifier.tanreiAppShellMenuButton()`; the shell draws it only in the modal presentation."}},"notes":"`TanreiAppShell(navigationOpen, onNavigationOpenChange, modifier, scroll, headerPosition, mainWidth, asideOrder, footerHidden, separation, asideLabel, onWindowClassChange, announcement = {}, header = {}, navigation = {}, aside = {}, footer = {}, navigationBar = {}) { contentPadding -> main }`, in the manner of a scaffold with a custom `Layout`. The window's class comes from `LocalWindowInfo.current.containerSize` in dp and is provided as `LocalTanreiWindowClass`. `scroll = Page` nests the main content, a stacked aside and the footer in one vertical scroll with the header pinned through a nested-scroll connection; the measured header height is provided as `LocalTanreiAppShellScrollOffset` and as `contentPadding`. Regions are exposed with `Modifier.semantics { isTraversalGroup = true; paneTitle = … }`, the aside's from `asideLabel`. System insets through `WindowInsets.safeDrawing`. No skip link: TalkBack and keyboard traversal groups move between regions. Not `ModalNavigationDrawer`, whose scrim and sheet cover the top bar: the shell's `Layout` places the open drawer and a scrim in the content area below the header; the covered regions take `Modifier.semantics { hideFromAccessibility() }` and `focusProperties { canFocus = false }` while it is open, the header keeps its semantics and focus, and a `BackHandler` closes it."},"flutter":{"status":"planned","name":"TanreiAppShell","props":{"scroll":"scroll","headerPosition":"headerPosition","mainWidth":"mainWidth","asideOrder":"asideOrder","footerHidden":"footerHidden","separation":"separation","navigationOpen":"navigationOpen","menuButtonPlacement":"menuButtonPlacement","asideLabel":"asideSemanticLabel"},"events":{"windowClassChange":"onWindowClassChanged","navigationOpenChange":"onNavigationOpenChanged"},"items":{"menu-button":{"name":"TanreiButton","props":{"label":"semanticLabel"},"events":{"click":"onPressed"},"notes":"An icon-only `TanreiButton` wrapped in `TanreiAppShellMenuButton`, placed in the header; the wrapper builds nothing outside the modal presentation."}},"notes":"`TanreiAppShell({ required Widget main, Widget? announcement, header, navigation, aside, footer, navigationBar, bool navigationOpen, bool footerHidden = false, ValueChanged<bool>? onNavigationOpenChanged, … })`, a widget of its own in the manner of a scaffold (`CustomMultiChildLayout`), not `Scaffold`, whose drawer and bar slots draw Material's own. The window's class comes from `MediaQuery.sizeOf(context).width` in logical pixels and is inherited as `TanreiWindowClass.of(context)`. `scroll: page` is a `CustomScrollView` with a pinned header sliver; the header's height is inherited as `TanreiAppShellScrollOffset.of(context)` and applied as scroll padding for `Scrollable.ensureVisible`. Regions are `Semantics(container: true, explicitChildNodes: true, label: …)` in a `FocusTraversalGroup` with an ordered policy (APS-22). Insets from `MediaQuery.viewPaddingOf`. No skip link, except on Flutter for the web, which is not a target of this package. Not `Scaffold.drawer`, which covers the app bar: the open drawer and a scrim stand in a `Stack` over the body below the header; the covered regions are wrapped in `ExcludeSemantics` and `ExcludeFocus` while it is open, the header is not, and a `PopScope` closes it on back."},"react-native":{"status":"planned","name":"AppShell","props":{"scroll":"scroll","headerPosition":"headerPosition","mainWidth":"mainWidth","asideOrder":"asideOrder","footerHidden":"footerHidden","separation":"separation","navigationOpen":"navigationOpen","menuButtonPlacement":"menuButtonPlacement","asideLabel":"asideLabel"},"events":{"windowClassChange":"onWindowClassChange","navigationOpenChange":"onNavigationOpenChange"},"items":{"menu-button":{"name":"Button","props":{"label":"accessibilityLabel"},"events":{"click":"onPress"},"notes":"An icon-only `Button` element passed as `menuButton`; the shell hands it to the header through context (`useAppShellMenuButton()`) and renders it only in the modal presentation."}},"notes":"`<AppShell navigationOpen onNavigationOpenChange header={…} navigation={…} aside={…} footer={…} footerHidden announcement={…} navigationBar={…} menuButton={…}>{main}</AppShell>`. The window's class comes from `useWindowDimensions().width` and is given by context (`useWindowClass()`). `scroll=\"page\"` is one `ScrollView` with `stickyHeaderIndices` for the header; the header's height is measured with `onLayout` and given by context (`useAppShellScrollOffset()`). Regions carry `accessibilityRole` where the platform has one (`header`, `menu`, `summary`) and `accessibilityLabel`; the order of APS-22 is the order of the rendered views. Insets from the safe-area context the package already depends on. The layout direction is the app's. No skip link. The open drawer is an absolutely positioned view below the header's measured height with a pressable scrim over the rest; the covered regions take `importantForAccessibility=\"no-hide-descendants\"` (Android) and `accessibilityElementsHidden` (iOS) while it is open — not `accessibilityViewIsModal`, which would hide the header too — and `BackHandler` closes it."}}}
|