A platform for community discussion. Free, open, simple.
en:
admin_js:
admin:
site_settings:
categories:
styleguide: "Discourse Styleguide"
js:
styleguide:
title: "Styleguide"
welcome: "To get started, choose a section from the navigation menu."
example:
toggle_code: "Toggle code sample"
try_this: "Try this:"
code_region: "Source snippet: %{title}"
kind:
component: "Component"
modifier: "Modifier"
service: "Service"
categories:
syntax: Syntax
atoms: Atoms
molecules: Molecules
organisms: Organisms
sections:
bem:
title: "BEM"
typography:
title: "Typography"
example: "Welcome to Discourse"
paragraph: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
date_time_inputs:
title: "Date/Time inputs"
menus:
title: "Menus"
context_menu:
title: "Context menu"
description: "A right-click opens a menu at the pointer instead of the browser's own. The surfaces below are plain regions rather than real components, so anything that misbehaves here is the modifier."
actions:
duplicate: "Duplicate"
delete: "Delete"
rename: "Rename row"
nesting:
example: "dContextMenu"
example_description: "Opens a menu where the pointer is. The reference it anchors to is the menu's own trigger, so nothing else has to know the menu was opened from a right-click."
try_this: "Right-click the outer surface, then right-click the inner one. Both are focusable, so Tab to one and press the context-menu key or Shift+F10 to open the same menu without a mouse."
note: "Both surfaces carry their own menu and the event bubbles through both. Accepting stops propagation, so the innermost handler opens its menu alone instead of alongside its parent's. The keyboard route is the browser's own: it dispatches the same event to the focused element, which is why the target has to be focusable and why each surface names itself as the focus target so closing gives focus back."
outer: "Outer surface"
inner: "Inner surface"
declining:
example: "Declining a right-click"
example_description: "A handler decides, synchronously, whether to replace the native menu. Declining leaves the event completely untouched, so an outer handler or the browser still gets it."
try_this: "Right-click the surface, then right-click inside the text field."
note: "A target that owns a text caret keeps the browser's own menu by default, so spelling and clipboard commands still work without a consumer opting out. The hook here only reports the decision so it is visible."
surface: "Outer surface"
field: "Right-click me for the browser's own menu"
untouched: "No right-click yet"
accepted: "Last right-click: accepted"
declined: "Last right-click: declined, the browser took it"
multi_select:
title: "Multi select"
choose_item: "Choose an item"
create_item: "Create an item"
footer_empty_title: "Footer with no results"
footer_empty_description: "The footer action remains available when there are no matching results."
footer_empty_try_this: "Open the menu and search for an item. The footer stays visible."
footer_scroll_title: "Footer with a long result list"
footer_scroll_description: "The result list scrolls independently from the footer action."
footer_scroll_try_this: "Open the menu and scroll the results. The footer remains in place."
reorderable_list:
title: "Reorderable list"
groups:
aria_label: "Reorderable list example groups"
start:
title: "Start here"
description: "The default shell: one handle per row that drags, opens the move menu, and takes the keyboard."
policies:
title: "Row policies"
description: "Which rows may move and which may go: pinned rows that keep their slot, and protected rows that offer no way out."
content:
title: "Interactive row content"
description: "Rows carrying their own live controls — toggles and inputs. They keep their normal focus and clicks; the list only claims the handle."
layouts:
title: "Cell layouts"
description: "Manual placement for table-shaped rows: the list renders the rows, and the pre-wired controls go wherever a cell needs them."
groups:
title: "Multiple lists"
description: "Lists registered under one group accept each other's rows, by drag or from the move menu."
description: "Interactive examples of DReorderableList: dragging, the move menu behind each handle, the keyboard accelerators, pinned rows, cross-list groups, removal, and inline creation."
basic_example: "Default list"
basic_description: "The out-of-the-box shell. Each row has one control, the handle: it is the drag grip, and it opens a menu of move destinations. Tab reaches every handle in document order alongside the rows' own controls, and the arrow keys walk between handles as a shortcut. Every real move announces the new position, and a move refused at either end says so rather than doing nothing."
basic_try_this: "Tab to a handle and press Enter for the move menu, or press the arrow keys to walk the list. Alt with an arrow moves the row itself; Alt with Home or End sends it to an end."
policies_example: "Pinned and required rows"
policies_description: "Two predicates, two policies, both subtractive. A row the movable predicate excludes renders no handle and keeps its exact slot, wherever it sits — this list pins its first and last rows, and the rows around them move within the slots that are left. A row the removable predicate excludes renders no remove control, so a protected row offers nothing that cannot be acted on."
policies_try_this: "Send the first movable row to the bottom from its menu: neither pinned row shifts. The required row has no remove control at all."
policies_pinned: "Pinned"
policies_required: "Required"
toggles_example: "Rows with toggles"
toggles_description: "The admin-dashboard pattern: rows carry their own interactive controls, which keep their normal focus and clicks. Rows toggled off stay in the list but stop being movable — they keep their slot and lose their handle, rather than disappearing into a separate block."
toggles_try_this: "Turn a toggle off and the row keeps its place but can no longer be moved. Reorder the rows around it and watch it stay put."
editable_example: "Editable rows"
editable_description: "The settings value-list pattern with stable identity: an input per row, the handle leading and the list's own remove control trailing. Typing stays in the input, and Tab moves through the row's own controls the way it does anywhere else."
editable_try_this: "Edit a value, then remove a row — the removal is announced and focus lands on the row that took its place."
table_example: "Native table rows, manual placement"
table_description: "Manual placement for cell layouts: the list renders the table body and its rows, and yields pre-wired controls for the row to place — here the handle occupies the first column."
table_try_this: "Drag a handle, or press Enter on one: the reorder control lives in the first cell and the whole row moves."
table_field: "Field"
table_type: "Type"
cross_list_example: "Cross-list moves"
cross_list_description: "Lists registered under one group accept each other's rows. Dragging carries a row across, and each handle's menu lists the sibling lists by name, so the move is reachable without a pointer. An emptied list keeps accepting drops."
cross_list_try_this: "Drag a row from Primary into Secondary, or open a row's menu and choose the other list by name."
cross_list_empty: "Drop a row here"
cross_list_primary: "Primary"
cross_list_secondary: "Secondary"
create_example: "Create affordance"
create_description: "With create enabled the list renders an input after the rows, so appending belongs to the same component that reorders."
create_try_this: "Type a fruit name and press Enter."
toasts:
title: "Toasts"
font_scale:
title: "Font System"
colors:
title: "Colors"
dialog:
title: "Dialog"
drag_and_drop:
title: "Drag and drop"
description: "The shared drag, drop, resize and gesture primitives, one capability per card."
groups:
aria_label: "Drag and drop groups"
basics:
title: "Basics"
description: "The matching vocabulary, and the positions a target reports."
sources:
title: "Sources"
description: "What a draggable element attaches, shows, and permits."
targets:
title: "Targets"
description: "How a target decides whether a drop belongs to it."
outside:
title: "From outside"
description: "Content the browser started dragging, from this page or another window."
reacting:
title: "Reacting"
description: "Responding to a drag without owning the drop."
resize:
title: "Resizing"
description: "Letting someone change a size, by keyboard as well as pointer."
gestures:
title: "Other gestures"
description: "Pointer and touch gestures that transfer nothing."
nothing_yet: "Nothing yet."
drag_me: "Drag me"
drop_here: "Drop here"
a_card: "A card"
a_note: "A note"
cards_only: "Accepts cards only"
landed: "Dropped: %{label}"
reported_position: "Reported position: %{position}"
positions:
above: "Above"
below: "Below"
left: "Left"
right: "Right"
inside: "Inside"
types_title: "Matching by type"
types_description: "`dDragAndDropSource` names a type and `dDragAndDropTarget` filters on it. A target engages only for the types in its accepts list; everything else drags straight over it."
types_try_this: "Drag each chip onto the zone. Only the card is taken."
types_note: "Omitting accepts accepts every registered source, which is rarely what a real surface wants."
positions_title: "Drop positions"
positions_description: "`dDragAndDropTarget` paints exactly one of these classes while a compatible drag is over it: four sibling positions plus one container position."
positions_note: "Positions are logical. In a right-to-left row, before still means the reading-order start and the class flips to --drag-right, so the indicator stays under the pointer."
axis_title: "Measuring across"
axis_description: "`dDragAndDropTarget` takes an axis, which chooses the midpoint that decides before from after. A row of columns measures horizontally."
axis_try_this: "Drop on the left and right halves of one column and compare the reported position."
fixed_position_title: "A fixed position"
fixed_position_description: "`dDragAndDropTarget` given a position skips the midpoint entirely and always reports that one."
fixed_position_try_this: "Drop on the bottom edge. It still reports before."
always_before: "Always reports before"
handle_title: "Dragging by a handle"
handle_description: "`dDragAndDropSource` takes a dragHandle, which confines where a drag may begin so the rest of the element stays selectable and a touch press meant to scroll still scrolls."
handle_try_this: "Select the text with the pointer, then drag the grip."
handle_note: "The row stays the drag body: it keeps data-drag-source, it is the target's source.element, and it is what the preview photographs. Style and assert on data-drag-source, never on draggable."
handle_landed: "The row landed, not the grip."
selectable_text: "Selectable text"
preview_title: "A custom preview"
preview_description: "`dDragAndDropSource` takes a dragPreview render function, which mounts a preview into an isolated offscreen container so nothing around the source bleeds into the drag image."
preview_try_this: "Drag the chip and watch what follows the pointer."
preview_badge: "Custom preview"
disabled_title: "Detaching a source"
disabled_description: "`dDragAndDropSource` takes disabled, which detaches the registration. This, not a handle, is how to stop an element being dragged."
disabled_try_this: "Switch it off, try to drag, then switch it back on."
draggable: "Draggable"
effect_title: "Declaring the effect"
effect_description: "`dDragAndDropTarget` names the operation it would perform through dropEffect, and the drag carries that effect on its record of the target."
effect_try_this: "Drop on each zone and compare the recorded effect."
effect_note: "The source's effectAllowed declares what it permits, but nothing here enforces the pair: a target may ask for an effect the source never permitted and no refusal follows. Keep the two consistent yourself."
asks_for_copy: "Asks for copy"
asks_for_move: "Asks for move"
recorded_effect: "Recorded effect: %{effect}"
nesting_title: "Nested targets"
nesting_description: "`dDragAndDropTarget` hands the callbacks to the deepest accepted target under the pointer, so one drop is never handled twice."
nesting_try_this: "Drop on the inner zone, then on the outer one around it."
nesting_note: "The cost is that an ancestor stops indicating as soon as a descendant claims the drag. A container that must stay lit should render from the service instead."
outer: "Outer"
inner: "Inner"
received_by: "Received by: %{name}"
accepts_self_title: "Refusing itself"
accepts_self_description: "`dDragAndDropTarget` takes acceptsSelf. An element that is both a source and a target accepts its own drop by default, since that is often meaningful."
accepts_self_try_this: "Drop a card onto itself, then onto the other one."
accepts_self_note: "The comparison is against the drag body, so a row dragged by a handle is still recognised as itself."
card_a: "Card A"
card_b: "Card B"
dropped_card: "Dropped card %{name}"
can_drop_title: "Refusing by payload"
can_drop_description: "`dDragAndDropTarget` takes canDrop, a synchronous gate that inspects the payload and refuses the drop before it lands."
can_drop_try_this: "Drag each chip over the zone. The locked one is never accepted."
unlocked: "Unlocked"
locked: "Locked"
unlocked_only: "Unlocked only"
adoption_title: "Adopting page content"
adoption_description: "`dDragAndDropTarget` takes adopts. The browser starts drags on ordinary content such as a link, which registers no source, and an adoption lets a target take those too."
adoption_try_this: "Drag the link above into the zone."
adoption_note: "Adoption is resolved once for the page, not per target: the first live adoption whose predicate matches names the drag. Two adoptions sharing a name must share a predicate."
a_link: "A link on this page"
drop_a_link: "Drop a link here"
external_title: "A drop from outside"
external_description: "`dDragAndDropExternalTarget` takes payloads dragged in from another window or application. It never sees a drag that began on this page."
external_try_this: "Drag a link from another tab, or a file from your desktop, into the zone."
external_note: "This is not the upload path. A file dropped here does not enter upload validation, progress, or the upload record."
from_outside: "Drop from outside the window"
external_axis_title: "An external slot"
external_axis_description: "`dDragAndDropExternalTarget` given an axis resolves a position from the pointer, just as an element target does."
external_axis_try_this: "Drop something near the top edge, then near the bottom."
external_axis_note: "Without a position or an axis the target is one destination rather than a slot: callbacks receive a null position and the indicator is the single --drag-over-external class."
a_slot: "A slot, not a destination"
monitor_title: "Watching every drag"
monitor_description: "`dDragAndDropMonitor` reacts to a drag happening anywhere, without becoming a drop target itself."
monitor_try_this: "Drag the chip and watch the log, whether or not you drop it on the zone."
monitor_note: "The element only anchors the modifier's lifecycle. A monitor is global."
service_title: "Rendering from state"
service_description: "The `dragAndDrop` service exposes the in-flight drag as tracked state, so a surface can arm itself without wiring a single callback."
service_try_this: "Start dragging the chip and watch the panel, without dropping."
service_note: "The service reads the other way from a target: an empty or missing filter matches nothing, because a caller that has not decided should not light up for every drag."
armed: "A card is in flight"
idle: "Idle"
auto_scroll_title: "Scrolling while dragging"
auto_scroll_description: "`dDragAndDropAutoScroll` scrolls a container while a drag hovers near its edge, so a row below the fold stays reachable."
auto_scroll_try_this: "Drag the chip to the bottom edge of the list and hold it there."
dwell_title: "Dwelling to reveal"
dwell_description: "`dDragDwell` fires a callback once a drag has hovered its element for a delay, without making the element a drop target."
dwell_try_this: "Drag the chip over the collapsed folder and hold it there until it opens, then drop it inside. Or drag away and watch it close again."
dwell_note: "The dwell fires once per hover and opens the folder. Dropping the chip inside keeps it open; dragging away or letting the drag end closes a folder the dwell opened."
dwell_filed:
one: "Filed %{count} chip"
other: "Filed %{count} chips"
dwell_expand: "Show rows"
dwell_collapse: "Hide rows"
row: "Row %{number}"
separator_title: "Resizing between regions"
separator_description: "`DResizeSeparator` is the component to reach for first. It wraps the `dResizeEdge` modifier and adds the separator contract: the role, one tab stop, and live announced values."
separator_try_this: "Drag the divider, then focus it and use the arrow keys."
separator_note: "A label is required: a focusable separator with no accessible name is announced as a bare splitter, which says nothing about what it resizes."
separator_label: "Resize the panes"
left_pane: "Left"
right_pane: "Right"
edge_title: "Resizing with your own element"
edge_description: "`dResizeEdge` is the modifier underneath `DResizeSeparator`. It owns the interaction and nothing else, so the role, the tab stop and the announced values are yours to supply."
edge_try_this: "Drag the divider, then focus it and use the arrow keys. It behaves the same; the difference is what the markup owes."
edge_note: "Reach for it only when the element and its semantics are already yours to provide. Everything spelled out in this example is what the component would have given you."
edge_label: "Resize the panes"
handles_title: "Resizing a box"
handles_description: "`DResizeHandles` is a component that renders the edges and corners of a box and reports pointer geometry for the consumer to turn into a size."
handles_try_this: "Drag any edge or corner."
handles_note: "Do not give a two-dimensional resize the separator role. It has no single value to announce, so the role would describe a control that does not exist."
pointer_drag_title: "Tracking the pointer"
pointer_drag_description: "`dPointerDrag` presses, moves and releases on one element. It transfers nothing and has no targets."
pointer_drag_try_this: "Drag the knob along the track."
pointer_drag_note: "Always handle the cancel callback. A gesture the browser interrupts otherwise leaves whatever the start opened still open."
knob: "Knob"
swipe_title: "Detecting a flick"
swipe_description: "`dSwipe` reports one discrete direction with velocity, rather than a value that follows the pointer."
swipe_try_this: "Swipe across the panel on a touch screen."
swipe_note: "Reach for a pointer drag instead when a value must track the pointer continuously."
swipe_here: "Swipe across me"
swiped: "Swiped %{direction}"
icons:
title: "Icons"
full_list: "See the full list of Font Awesome Icons"
forms:
title: "Forms"
buttons:
title: "Buttons"
dropdowns:
title: "Dropdowns"
categories:
title: "Categories"
bread_crumbs:
title: "Bread Crumbs"
navigation:
title: "Navigation"
navigation_bar:
title: "Navigation Bar"
navigation_stacked:
title: "Navigation Stacked"
categories_list:
title: "Categories List"
topic_link:
title: "Topic Link and Status"
topic_list_item:
title: "Topic List Item"
topic_statuses:
title: "Topic Statuses"
topic_list:
title: "Topic List"
basic_topic_list:
title: "Basic Topic List"
signup_cta:
title: "Signup CTA"
topic_timer_info:
title: "Topic Timers"
topic_footer_buttons:
title: "Topic Footer Buttons"
topic_notifications:
title: "Topic Notifications"
post:
title: "Post"
post_list:
title: "Post List"
empty_example: "<PostList /> empty state"
populated_example: "<PostList /> populated state"
post_oneboxes:
title: "Post Oneboxes"
topic_map:
title: "Topic Map"
site_header:
title: "Site Header"
more_topics:
title: "More Topics"
post_menu:
title: "Post Menu"
roving_focus:
title: "Roving focus"
description: "Keyboard navigation inside a composite widget, built from plain semantic HTML so that anything that misbehaves here is the modifier rather than a component wrapped around it. The patterns mirror the interactive examples in the WAI-ARIA Authoring Practices."
groups:
aria_label: "Roving focus patterns"
toolbar:
title: "Toolbar"
description: "A single tab stop holding controls of mixed kinds, entered on the first one."
listbox:
title: "Listbox"
description: "A vertical cursor with type-ahead, entered on the option already chosen."
combobox:
title: "Combobox"
description: "A cursor that moves without focus moving, reported by aria-activedescendant."
radio:
title: "Radio group"
description: "A group whose checked member is where the cursor starts, and follows."
tree:
title: "Tree"
description: "A vertical cursor over the visible rows, with hierarchy left to the consumer."
adjacent:
title: "Beside a control"
description: "A group that Tab never reaches, entered and left through its edges."
components:
title: "With components"
description: "The same cursor over real buttons, where items are destroyed under it."
toolbar:
label: "Text formatting"
example: "Toolbar"
example_description: "The whole bar is one tab stop. Activation is left to the native buttons rather than routed through the modifier, so Enter and Space behave exactly as they would without it. Cut and Paste are disabled in the two different ways the practice page distinguishes, and the cursor treats them differently as a result."
try_this: "Tab in, then arrow along the bar. Home and End reach the ends. Arrow past Cut and Paste: Cut is stepped over, while Paste can be reached and read out but does nothing when activated."
bold: "Bold"
italic: "Italic"
underline: "Underline"
copy: "Copy"
cut: "Cut"
paste: "Paste"
docs: "Authoring practices"
tags:
label: "Applied tags"
example: "Removing the item under the cursor"
example_description: "Each tag is a real button, so removing one destroys the element holding the cursor and the button runs its action a tick later than the key that asked for it. The cursor moves to the next tag rather than letting focus fall to the page."
try_this: "Arrow to a tag in the middle and press Enter to remove it, then check where the cursor went. Remove the last tag in the row and it moves backwards instead. Remove them all and it stops rather than guessing."
remove: "Remove %{tag}"
reset: "Start over"
design: "Design"
keyboard: "Keyboard"
release: "Release"
support: "Support"
multi:
label: "Accessibility checks"
example: "Multi-select entry"
example_description: "Entry lands on the first chosen row, returning the reader to their own selection rather than to the top. That knowingly starts the cursor where the next Space would remove something, which is the trade the pattern makes. Arrows wrap, so passing the last row returns to the first."
try_this: "Note that the cursor starts on the chosen row rather than the first one, then arrow past the last row to come back around to the top."
keyboard: "Keyboard navigable"
contrast: "Sufficient contrast"
captions: "Captions provided"
motion: "Reduced motion honored"
labels: "Fields are labelled"
adjacent:
label: "Filters"
field: "Search"
placeholder: "Search topics"
example: "A group Tab does not reach"
example_description: "The filters are not in the tab sequence, so Tab goes straight to the field and the pair counts as one component rather than two. The filters are reached with an arrow from the start of the field, and running off their end returns there. The modifier reports the edge and the direction; where to go next is this example's decision, because only it knows the field exists."
try_this: "Tab in and notice you land on the field, not the filters. With the caret at the start, press the left arrow to step into them, arrow between them, then continue past the last to return to the field."
open: "Open"
mine: "Mine"
recent: "Recent"
listbox:
label: "Fruit"
example: "Listbox with type-ahead"
example_description: "Typing moves the cursor to the option whose name starts with what was typed, which is what the practice page specifies and what a screen reader reads out. The count beside each option is decorative, so it belongs to the row's text but not to its name."
try_this: "Arrow through the options, then type a letter such as b. Press a repeatedly to walk the options sharing that initial, then pause and type apr to land on Apricot directly. Typing a digit matches nothing, because the counts are not part of any name."
apple: "Apple"
apricot: "Apricot"
banana: "Banana"
blackberry: "Blackberry"
cherry: "Cherry"
coconut: "Coconut"
combobox:
label: "Email digest"
example: "Cursor without focus"
example_description: "The control keeps focus while the arrows move a highlight through the options, and the control reports where that highlight is rather than the browser moving to it. This is the second of the two strategies the practice page describes, and the one a combobox needs so the reader can keep typing."
try_this: "Open the list and arrow through it while watching the focus ring: it stays on the button. Press Enter to choose, and Escape or another click to close."
daily: "Daily"
weekly: "Weekly"
monthly: "Monthly"
never: "Never"
radio:
label: "Alignment"
example: "Radio group"
example_description: "A radio group marks its choice with aria-checked rather than aria-selected, and entering the group lands on that member instead of the first one. Moving the cursor moves the choice with it, which is the one pattern where that is expected."
try_this: "Tab into the group and notice it enters on the checked member. Arrow along it and watch the choice follow. Tab away and back to return to the new choice."
left: "Left"
center: "Center"
right: "Right"
tree:
label: "Source tree"
example: "Tree"
example_description: "The cursor runs over the rows that are visible right now, so collapsing a parent removes its children from the sequence. Expand and collapse come from the cross-axis event, which reports the arrows this group does not navigate as a direction, leaving what that direction means to the example."
try_this: "Arrow up and down the rows, then use the right and left arrows on a parent to open and close it. Collapse a parent and notice that its children leave the cursor with it."
rtl_example: "Tree, right to left"
rtl_description: "The same component under a right-to-left direction, from the same source. The arrows swap with the writing direction, so the one pointing at a row's children is still the one that opens them, and the example itself never mentions direction."
rtl_try_this: "Open and close a parent, then compare with the copy above: the children sit on the other side, and the arrow that reaches them has swapped to match."
components: "Components"
button: "Button"
select: "Select"
modifiers: "Modifiers"
roving_focus: "Roving focus"
auto_focus: "Auto focus"
docked_composer:
title: "Docked Composer"
modal:
title: "Modal"
header: "Modal Title"
footer: "Modal Footer"
open: "Open modal"
user_about:
title: "User About Box"
header_icons:
title: "Header Icons"
spinners:
title: "Spinners"
otp:
title: "OTP"
shortcut:
title: "Shortcut"
description: "One way to show a keyboard shortcut and announce it. formatShortcut turns the spelling key bindings use into a drawn label and an aria-keyshortcuts value; DShortcut draws it as a chip and, given a block, yields both forms so an element cannot draw one shortcut and announce another."
keycaps_example: "Drawing a shortcut"
keycaps_description: "`<DShortcut @keys>` draws one chip per shortcut. Spell the keys the way a binding does: `+`-joined, any case, with `mod` for the platform's primary modifier. Modifiers are listed in the platform's own order whatever the spelling, glyph modifiers run together, and every other key keeps a gap."
keycaps_note: "On Apple platforms modifiers draw as glyphs (`⌘⇧ D`); elsewhere they draw as words (`Ctrl Shift D`). Each glyph carries a visually hidden spoken name, so the chip reads as \"Command Shift D\" when it is content in its own right."
block_example: "Announcing on the element that reacts"
block_description: "`aria-keyshortcuts` belongs on the element the keys activate, which only the caller knows. Given a block, `DShortcut` renders no element of its own and yields `aria`, `label`, `keys` and a bound `Kbd`, so the button's announcement and the chip beside it come from one spelling. The yielded chip is hidden from assistive technology, since the button announces the shortcut itself."
block_try_this: "Focus the button with a screen reader running: it reads its name once, then the shortcut from the attribute, never the chip."
block_note: "The announced form is localized and spoken, not the ARIA token list: readers speak the attribute verbatim, so it says `Command+B` on a Mac and `Ctrl+B` elsewhere, and names punctuation (`Period`, `Slash`) that readers would otherwise drop."
string_form_example: "Where only a string fits"
string_form_description: "A `title`, an `aria-label` or a select option cannot hold an element. Call `formatShortcut` directly and use `.label` for the text and `.aria` for the attribute; one call, one spelling, both forms."
string_form_try_this: "Hover the button for the tooltip; focus it with a screen reader for the announcement."
spellings_example: "Spellings and their two forms"
spellings_description: "What each input resolves to. `mod`, `meta`, `command` and `cmd` all mean the primary modifier; `ctrl` stays the Control key on every platform; `plus` names the `+` key; arrow words and their HTML entities both draw as arrows."
spellings_note: "Only the announced column changes with the interface language; the drawn column changes with the platform."
keyboard_gate_example: "Only where there is a keyboard"
keyboard_gate_description: "A shortcut is noise on a phone. `capabilities.hasKeyboard` infers a physical keyboard from a fine primary pointer, or from a keydown an on-screen keyboard never sends, and `DShortcut` draws and announces nothing without it. `@always` opts out, for surfaces that exist to document the keys."
keyboard_gate_try_this: "Open this page on a phone: the default chip disappears while the `@always` one stays. Pair a keyboard and press a modifier key, and the default chip appears without a reload."
keyboard_gate_note: "Every shortcut on the site is gated except the keyboard shortcuts help modal and this page."
empty_state:
title: "Empty State"
tooltips:
title: "Tooltips"
description: "Description"
header: "Header"
hover_to_see: "Hover to see a tooltip"
char_counter:
title: "Character Counter"
placeholder: "Enter your text here..."
combo_button:
title: "Combo Button"
segmented_control:
title: "Segmented Control (Button toggle group)"
virtual_list:
title: "Virtual list"
tabs:
title: "Tabs"
overflow_controls:
title: "Overflow controls"