OGE logoOGE

List View

oge-list-view renders a templated list — contacts, an inbox, a feed — with selection, sticky group headers, windowed rendering for long lists, search, load-more and swipe actions.

Its role follows selectionMode: a selectable list is a WAI-ARIA APG listbox whose scroll viewport takes focus and tracks the active option with aria-activedescendant — the focus model that survives virtualization — and selectionMode: 'none' renders a role="list" with a roving tab stop. Every item announces its position in the whole list (aria-posinset / aria-setsize).

APG listbox virtual scrolling sticky groups search infinite scroll swipe actions

Basics & templates

Pass items and a displayExpr; an [ogeListViewItemTemplate] replaces the row content while the list keeps the role, focus and selection. Without selection the list is a role="list": arrows, Home / End, PageUp / PageDown and type-ahead move one roving tab stop, Enter or a click reports itemClick.

items displayExpr ogeListViewItemTemplate itemClick
Ada LovelaceAnalyst
Grace HopperCompiler lead
Alan TuringCryptanalyst
Margaret HamiltonFlight software
Katherine JohnsonTrajectories

Opened: —

Selection

single or multiple turns the list into an APG listbox. Space toggles, Enter selects (single), Shift+arrows and Shift+click extend a range, Ctrl+A selects all and announces the count; disabledExpr keeps an option visible but aria-disabled, and the keyboard skips it.

selectionMode selectedKeys showSelectionControls disabledExpr
Ada Lovelace
Grace Hopper
Alan Turing
Margaret Hamilton
Katherine Johnson
Linus Torvalds

Selected: 2

Grouping & sticky headers

groupExpr splits the items into labelled segments (role="group" in a listbox, a nested list in a plain list). The visible header is aria-hidden — the segment already carries the name — and sticks to the top of its segment, so the next header pushes the previous one out.

groupExpr ogeListViewGroupTemplate sticky
Ada Lovelace
Alan Turing
Katherine Johnson
Edsger Dijkstra
Grace Hopper
Margaret Hamilton
Linus Torvalds
Radia Perlman
Frances Allen
Barbara Liskov
Donald Knuth
Hedy Lamarr

Virtual scrolling

With fixed row heights the list renders only the rows in view plus a small overscan, on core's offset tree — 10 000 items scroll and type-ahead instantly. Keyboard navigation scrolls the active option into the window before pointing aria-activedescendant at it, and group headers stay pinned however far a group scrolled.

virtualScroll height 10 000 items
Ticket #00001
Ticket #00002
Ticket #00003
Ticket #00004
Ticket #00005
Ticket #00006
Ticket #00007
Ticket #00008
Ticket #00009
Ticket #00010
Ticket #00011
Ticket #00012
Ticket #00013
Ticket #00014

Selected: none

Search & infinite scroll

searchEnabled adds a labelled search field that filters locale- and accent-insensitively ("istanbul" finds "İstanbul") and announces the result count. pageLoadMode: 'scroll' emits loadMoreRequested near the end (once per page), 'button' renders a Load more button, and the arrival is announced.

searchEnabled pageLoadMode hasMore loading
İstanbul
Ankara
İzmir
Berlin
München
Köln
Paris
Lyon
Zürich
Genève
Kraków
Warszawa
São Paulo
Brasília
Málaga
Sevilla

Loaded: 16

Swipe actions

Actions are revealed by a horizontal swipe on touch (mirrored in RTL) and on hover or focus with a mouse; tapping or clicking one runs it. Inside an option they are aria-hidden glyphs — a listbox cannot hold buttons — so their keyboard twin is each action's shortcut, advertised in aria-keyshortcuts and described to screen readers.

itemActions shortcut itemActionClick RTL
Nightly build passed
Design review moved to Friday
Your invoice for October
Lunch?
New sign-in from Chrome on Windows
Actions: Archive (Shift+A), Delete (Delete)

Last action: —