[{"data":1,"prerenderedAt":838},["ShallowReactive",2],{"navigation_docs":3,"-examples-aria":107,"-examples-aria-surround":833},[4,26,57,87,97],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":25},"Getting Started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-book-open",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Architecture","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F3.architecture","i-lucide-workflow",false,{"title":27,"icon":28,"path":29,"stem":30,"children":31,"page":25},"Reference","i-lucide-layers","\u002Freference","2.reference",[32,37,42,47,52],{"title":33,"path":34,"stem":35,"icon":36},"VirtualGrid","\u002Freference\u002Fvirtual-grid","2.reference\u002F1.virtual-grid","i-lucide-table-2",{"title":38,"path":39,"stem":40,"icon":41},"Primitives","\u002Freference\u002Fprimitives","2.reference\u002F2.primitives","i-lucide-crosshair",{"title":43,"path":44,"stem":45,"icon":46},"Utilities","\u002Freference\u002Futilities","2.reference\u002F3.utilities","i-lucide-wrench",{"title":48,"path":49,"stem":50,"icon":51},"Benchmarks","\u002Freference\u002Fbenchmarks","2.reference\u002F4.benchmarks","i-lucide-timer",{"title":53,"path":54,"stem":55,"icon":56},"ARIA patterns","\u002Freference\u002Faria-patterns","2.reference\u002F6.aria-patterns","i-lucide-accessibility",{"title":58,"icon":59,"path":60,"stem":61,"children":62,"page":25},"Guides","i-lucide-compass","\u002Fguides","3.guides",[63,67,72,77,82],{"title":64,"path":65,"stem":66,"icon":56},"Accessibility","\u002Fguides\u002Faccessibility","3.guides\u002F1.accessibility",{"title":68,"path":69,"stem":70,"icon":71},"Popovers and overlays","\u002Fguides\u002Fpopovers","3.guides\u002F2.popovers","i-lucide-message-square",{"title":73,"path":74,"stem":75,"icon":76},"Floating UI","\u002Fguides\u002Ffloating-ui","3.guides\u002F3.floating-ui","i-lucide-layers-2",{"title":78,"path":79,"stem":80,"icon":81},"Sizing and direction","\u002Fguides\u002Fsizing-and-direction","3.guides\u002F4.sizing-and-direction","i-lucide-move",{"title":83,"path":84,"stem":85,"icon":86},"Performance","\u002Fguides\u002Fperformance","3.guides\u002F5.performance","i-lucide-gauge",{"title":88,"icon":89,"path":90,"stem":91,"children":92,"page":25},"Examples","i-lucide-flask-conical","\u002Fexamples","4.examples",[93],{"title":94,"path":95,"stem":96,"icon":56},"ARIA examples","\u002Fexamples\u002Faria","4.examples\u002F1.aria",{"title":98,"icon":99,"path":100,"stem":101,"children":102,"page":25},"Changes","i-lucide-history","\u002Fchanges","5.changes",[103],{"title":104,"path":105,"stem":106,"icon":99},"Changelog","\u002Fchanges\u002Fchangelog","5.changes\u002F1.changelog",{"id":108,"title":94,"body":109,"description":826,"extension":827,"links":828,"meta":829,"navigation":830,"path":95,"seo":831,"stem":96,"__hash__":832},"docs\u002F4.examples\u002F1.aria.md",{"type":110,"value":111,"toc":814},"minimark",[112,121,126,146,149,152,162,173,181,185,202,205,207,222,230,237,244,248,255,258,260,280,287,293,300,303,306,309,311,322,337,344,348,351,356,367,371,379,390,394,403,406,410,430,810],[113,114,115,116,120],"p",{},"Each grid on this page holds 10,000 items and shows one of the ARIA patterns from the ",[117,118,119],"a",{"href":65},"accessibility guide",". Each demo's source link opens its component.",[122,123,125],"h2",{"id":124},"list-with-item-positions","List with item positions",[113,127,128,129,133,134,137,138,141,142,145],{},"The grid has ",[130,131,132],"code",{},"role=\"list\"",", and each item has ",[130,135,136],{},"role=\"listitem\"",", ",[130,139,140],{},"aria-setsize"," and ",[130,143,144],{},"aria-posinset",".",[147,148],"aria-list-demo",{},[113,150,151],{},"Check it:",[153,154,155,159],"ol",{},[156,157,158],"li",{},"Scroll to the middle of the list, then move the screen reader cursor onto an item. The announced position matches the item's number, for example 4,200 of 10,000.",[156,160,161],{},"Scroll the grid and select an item again. The announced position follows the item, not its place among the rendered elements.",[113,163,164,165,141,169,145],{},"Build it with ",[117,166,168],{"href":167},"\u002Fguides\u002Faccessibility#add-list-roles","Add list roles",[117,170,172],{"href":171},"\u002Fguides\u002Faccessibility#set-the-size-and-position-of-each-item","Set the size and position of each item",[113,174,175],{},[117,176,180],{"href":177,"rel":178},"https:\u002F\u002Fgithub.com\u002Fastraldev\u002Fvvirtual-grid\u002Fblob\u002Fmain\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002FAriaListDemo.vue",[179],"nofollow","Source: AriaListDemo.vue",[122,182,184],{"id":183},"listbox-with-a-selected-option","Listbox with a selected option",[113,186,128,187,190,191,194,195,198,199,145],{},[130,188,189],{},"role=\"listbox\""," and an ",[130,192,193],{},"aria-label",", and each item is an ",[130,196,197],{},"option"," with ",[130,200,201],{},"aria-selected",[203,204],"aria-listbox-demo",{},[113,206,151],{},[153,208,209,219],{},[156,210,211,212,214,215,218],{},"Click an option. Its ring appears, and its ",[130,213,201],{}," changes to ",[130,216,217],{},"true"," in the Elements panel of the browser's developer tools.",[156,220,221],{},"With a screen reader running, move its cursor onto the option and listen for \"selected\".",[223,224,225,226,145],"warning",{},"This demo selects with the mouse only. Clicking an option does not move focus, so a keyboard user cannot select one here. To make options focusable, use the pattern from ",[117,227,229],{"href":228},"#keyboard-navigation","Keyboard navigation",[113,231,232,233,145],{},"Build it with the ",[117,234,236],{"href":235},"\u002Freference\u002Faria-patterns#list-and-listbox","listbox and option roles",[113,238,239],{},[117,240,243],{"href":241,"rel":242},"https:\u002F\u002Fgithub.com\u002Fastraldev\u002Fvvirtual-grid\u002Fblob\u002Fmain\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002FAriaListboxDemo.vue",[179],"Source: AriaListboxDemo.vue",[122,245,247],{"id":246},"busy-placeholders","Busy placeholders",[113,249,250,251,254],{},"The page provider takes 1.5 seconds, so scrolling shows placeholders. Each placeholder has ",[130,252,253],{},"aria-busy=\"true\""," and keeps its position in the set.",[256,257],"aria-busy-demo",{},[113,259,151],{},[153,261,262,265,274],{},[156,263,264],{},"Scroll the grid. Gray placeholders appear before the items load.",[156,266,267,268,270,271,273],{},"Right-click a placeholder before it loads and choose Inspect. The Elements panel shows ",[130,269,253],{}," on the element, with the same ",[130,272,144],{}," the loaded item gets.",[156,275,276,277,145],{},"Wait 1.5 seconds. The grid replaces the placeholder with the item, which has no ",[130,278,279],{},"aria-busy",[281,282,283,284,286],"note",{},"Screen readers differ in what they do with ",[130,285,279],{}," on a list item. Some say \"busy\" and some say nothing, so move the screen reader cursor onto a placeholder and note what yours says.",[113,288,164,289,145],{},[117,290,292],{"href":291},"\u002Fguides\u002Faccessibility#mark-placeholders-as-busy","Mark placeholders as busy",[113,294,295],{},[117,296,299],{"href":297,"rel":298},"https:\u002F\u002Fgithub.com\u002Fastraldev\u002Fvvirtual-grid\u002Fblob\u002Fmain\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002FAriaBusyDemo.vue",[179],"Source: AriaBusyDemo.vue",[122,301,229],{"id":302},"keyboard-navigation",[113,304,305],{},"Press Tab to enter the grid, then use the arrow keys. The focus ring follows the focused item. The grid scrolls only when the item would leave the view, and only far enough to show it.",[307,308],"aria-keyboard-demo",{},[113,310,151],{},[153,312,313,316,319],{},[156,314,315],{},"Press Tab until the focus reaches the grid. The first item has a focus ring.",[156,317,318],{},"Press the arrow keys. The focus moves one item or one row in that direction.",[156,320,321],{},"Hold the down arrow with a screen reader running. The grid scrolls, and the announced position keeps climbing.",[113,323,164,324,137,328,332,333,145],{},[117,325,327],{"href":326},"\u002Fguides\u002Faccessibility#keep-the-focused-index-in-a-ref","Keep the focused index in a ref",[117,329,331],{"href":330},"\u002Fguides\u002Faccessibility#scroll-to-the-new-item-and-focus-it","Scroll to the new item and focus it",", and ",[117,334,336],{"href":335},"\u002Fguides\u002Faccessibility#listen-for-arrow-keys-on-the-grid","Listen for arrow keys on the grid",[113,338,339],{},[117,340,343],{"href":341,"rel":342},"https:\u002F\u002Fgithub.com\u002Fastraldev\u002Fvvirtual-grid\u002Fblob\u002Fmain\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002FAriaKeyboardDemo.vue",[179],"Source: AriaKeyboardDemo.vue",[122,345,347],{"id":346},"test-it","Test it",[113,349,350],{},"A screen reader announces facts that hold for every item: its role, its name and its position, for example 4,200 of 10,000. The exact wording and the order vary by screen reader and browser, so check the facts and not a fixed sentence.",[352,353,355],"h3",{"id":354},"macos-voiceover","macOS VoiceOver",[153,357,358,361,364],{},[156,359,360],{},"Press Cmd + F5 to start VoiceOver.",[156,362,363],{},"Move through the page with the VO keys (Ctrl + Option) and the arrow keys.",[156,365,366],{},"Press VO + U to open the rotor and list the page's lists and items.",[352,368,370],{"id":369},"windows-nvda","Windows NVDA",[113,372,373,378],{},[117,374,377],{"href":375,"rel":376},"https:\u002F\u002Fwww.nvaccess.org\u002Fdownload\u002F",[179],"NVDA"," is a screen reader for Windows that costs nothing to download and use.",[153,380,381,384,387],{},[156,382,383],{},"Install NVDA and start it.",[156,385,386],{},"Press Insert + F7 to open the elements list.",[156,388,389],{},"Close it, then use the arrow keys in browse mode to move through the items.",[352,391,393],{"id":392},"without-a-screen-reader","Without a screen reader",[395,396,397,400],"ul",{},[156,398,399],{},"Chrome: open DevTools, then Elements, then the Accessibility pane. Select an item to see its computed role, name and position in set.",[156,401,402],{},"Firefox: open DevTools and use the Accessibility inspector to see the same properties.",[113,404,405],{},"Scroll the grid and select an item again. The position in set must match the item's number, not its place among the rendered elements.",[352,407,409],{"id":408},"automated","Automated",[113,411,412,413,418,419,426,427,429],{},"The ",[117,414,417],{"href":415,"rel":416},"https:\u002F\u002Fwww.deque.com\u002Faxe\u002Fdevtools\u002F",[179],"axe DevTools"," extension and ",[117,420,423],{"href":421,"rel":422},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@axe-core\u002Fplaywright",[179],[130,424,425],{},"@axe-core\u002Fplaywright"," report missing or invalid roles. A Playwright test can also scroll the grid and read ",[130,428,144],{}," from the items that are rendered after the scroll:",[431,432,437],"pre",{"className":433,"code":434,"language":435,"meta":436,"style":436},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { test, expect } from \"@playwright\u002Ftest\";\n\ntest(\"items keep their position after scrolling\", async ({ page }) => {\n  await page.goto(\"\u002Fexamples\u002Faria\");\n  const grid = page.locator('[role=\"list\"]').first();\n  await grid.evaluate((el) => {\n    el.parentElement!.scrollTop = 20000;\n  });\n\n  const item = grid.locator(\"[aria-posinset]\").first();\n  await expect(item).toHaveAttribute(\"aria-setsize\", \"10000\");\n  const position = Number(await item.getAttribute(\"aria-posinset\"));\n  expect(position).toBeGreaterThan(100);\n});\n","ts","",[130,438,439,481,488,527,554,595,620,645,655,660,695,735,773,800],{"__ignoreMap":436},[440,441,444,448,452,456,459,462,465,468,471,475,478],"span",{"class":442,"line":443},"line",1,[440,445,447],{"class":446},"s7zQu","import",[440,449,451],{"class":450},"sMK4o"," {",[440,453,455],{"class":454},"sTEyZ"," test",[440,457,458],{"class":450},",",[440,460,461],{"class":454}," expect",[440,463,464],{"class":450}," }",[440,466,467],{"class":446}," from",[440,469,470],{"class":450}," \"",[440,472,474],{"class":473},"sfazB","@playwright\u002Ftest",[440,476,477],{"class":450},"\"",[440,479,480],{"class":450},";\n",[440,482,484],{"class":442,"line":483},2,[440,485,487],{"emptyLinePlaceholder":486},true,"\n",[440,489,491,495,498,500,503,505,507,511,514,518,521,524],{"class":442,"line":490},3,[440,492,494],{"class":493},"s2Zo4","test",[440,496,497],{"class":454},"(",[440,499,477],{"class":450},[440,501,502],{"class":473},"items keep their position after scrolling",[440,504,477],{"class":450},[440,506,458],{"class":450},[440,508,510],{"class":509},"spNyl"," async",[440,512,513],{"class":450}," ({",[440,515,517],{"class":516},"sHdIc"," page",[440,519,520],{"class":450}," })",[440,522,523],{"class":509}," =>",[440,525,526],{"class":450}," {\n",[440,528,530,533,535,537,540,543,545,547,549,552],{"class":442,"line":529},4,[440,531,532],{"class":446},"  await",[440,534,517],{"class":454},[440,536,145],{"class":450},[440,538,539],{"class":493},"goto",[440,541,497],{"class":542},"swJcz",[440,544,477],{"class":450},[440,546,95],{"class":473},[440,548,477],{"class":450},[440,550,551],{"class":542},")",[440,553,480],{"class":450},[440,555,557,560,563,566,568,570,573,575,578,581,583,585,587,590,593],{"class":442,"line":556},5,[440,558,559],{"class":509},"  const",[440,561,562],{"class":454}," grid",[440,564,565],{"class":450}," =",[440,567,517],{"class":454},[440,569,145],{"class":450},[440,571,572],{"class":493},"locator",[440,574,497],{"class":542},[440,576,577],{"class":450},"'",[440,579,580],{"class":473},"[role=\"list\"]",[440,582,577],{"class":450},[440,584,551],{"class":542},[440,586,145],{"class":450},[440,588,589],{"class":493},"first",[440,591,592],{"class":542},"()",[440,594,480],{"class":450},[440,596,598,600,602,604,607,609,611,614,616,618],{"class":442,"line":597},6,[440,599,532],{"class":446},[440,601,562],{"class":454},[440,603,145],{"class":450},[440,605,606],{"class":493},"evaluate",[440,608,497],{"class":542},[440,610,497],{"class":450},[440,612,613],{"class":516},"el",[440,615,551],{"class":450},[440,617,523],{"class":509},[440,619,526],{"class":450},[440,621,623,626,628,631,634,637,639,643],{"class":442,"line":622},7,[440,624,625],{"class":454},"    el",[440,627,145],{"class":450},[440,629,630],{"class":454},"parentElement",[440,632,633],{"class":450},"!.",[440,635,636],{"class":454},"scrollTop",[440,638,565],{"class":450},[440,640,642],{"class":641},"sbssI"," 20000",[440,644,480],{"class":450},[440,646,648,651,653],{"class":442,"line":647},8,[440,649,650],{"class":450},"  }",[440,652,551],{"class":542},[440,654,480],{"class":450},[440,656,658],{"class":442,"line":657},9,[440,659,487],{"emptyLinePlaceholder":486},[440,661,663,665,668,670,672,674,676,678,680,683,685,687,689,691,693],{"class":442,"line":662},10,[440,664,559],{"class":509},[440,666,667],{"class":454}," item",[440,669,565],{"class":450},[440,671,562],{"class":454},[440,673,145],{"class":450},[440,675,572],{"class":493},[440,677,497],{"class":542},[440,679,477],{"class":450},[440,681,682],{"class":473},"[aria-posinset]",[440,684,477],{"class":450},[440,686,551],{"class":542},[440,688,145],{"class":450},[440,690,589],{"class":493},[440,692,592],{"class":542},[440,694,480],{"class":450},[440,696,698,700,702,704,707,709,711,714,716,718,720,722,724,726,729,731,733],{"class":442,"line":697},11,[440,699,532],{"class":446},[440,701,461],{"class":493},[440,703,497],{"class":542},[440,705,706],{"class":454},"item",[440,708,551],{"class":542},[440,710,145],{"class":450},[440,712,713],{"class":493},"toHaveAttribute",[440,715,497],{"class":542},[440,717,477],{"class":450},[440,719,140],{"class":473},[440,721,477],{"class":450},[440,723,458],{"class":450},[440,725,470],{"class":450},[440,727,728],{"class":473},"10000",[440,730,477],{"class":450},[440,732,551],{"class":542},[440,734,480],{"class":450},[440,736,738,740,743,745,748,750,753,755,757,760,762,764,766,768,771],{"class":442,"line":737},12,[440,739,559],{"class":509},[440,741,742],{"class":454}," position",[440,744,565],{"class":450},[440,746,747],{"class":493}," Number",[440,749,497],{"class":542},[440,751,752],{"class":446},"await",[440,754,667],{"class":454},[440,756,145],{"class":450},[440,758,759],{"class":493},"getAttribute",[440,761,497],{"class":542},[440,763,477],{"class":450},[440,765,144],{"class":473},[440,767,477],{"class":450},[440,769,770],{"class":542},"))",[440,772,480],{"class":450},[440,774,776,779,781,784,786,788,791,793,796,798],{"class":442,"line":775},13,[440,777,778],{"class":493},"  expect",[440,780,497],{"class":542},[440,782,783],{"class":454},"position",[440,785,551],{"class":542},[440,787,145],{"class":450},[440,789,790],{"class":493},"toBeGreaterThan",[440,792,497],{"class":542},[440,794,795],{"class":641},"100",[440,797,551],{"class":542},[440,799,480],{"class":450},[440,801,803,806,808],{"class":442,"line":802},14,[440,804,805],{"class":450},"}",[440,807,551],{"class":454},[440,809,480],{"class":450},[811,812,813],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":436,"searchDepth":483,"depth":483,"links":815},[816,817,818,819,820],{"id":124,"depth":483,"text":125},{"id":183,"depth":483,"text":184},{"id":246,"depth":483,"text":247},{"id":302,"depth":483,"text":229},{"id":346,"depth":483,"text":347,"children":821},[822,823,824,825],{"id":354,"depth":490,"text":355},{"id":369,"depth":490,"text":370},{"id":392,"depth":490,"text":393},{"id":408,"depth":490,"text":409},"Live grids with list, listbox, busy and keyboard patterns, and four ways to test them.","md",null,{},{"icon":56},{"title":94,"description":826},"cUOSSHMBJQIxDm5y-VRlVXBL_kd-bvIRsFDHe6g_Rzs",[834,836],{"title":83,"path":84,"stem":85,"description":835,"icon":86,"children":-1},"Keep scrolling responsive and cut the requests a network-backed grid sends.",{"title":104,"path":105,"stem":106,"description":837,"icon":99,"children":-1},"What changed in each release of vvirtual-grid, starting at the fork.",1794785669353]