Skip to content

Navigation ​

AdminVora ships separate patterns for switching content in place, moving between pages, showing progress, paging through data and browsing a hierarchy. Choose the pattern by behaviour, not by how similar the controls look.

Tabs ​

Use tabs when a control reveals a panel without changing the page or URL. Put data-av-tabs on a common ancestor, use .av-tabs for the tablist and connect every tab to one panel with aria-controls.

html
<div data-av-tabs>
  <div class="av-tabs av-tabs--line" role="tablist" aria-label="Order details">
    <button class="av-tabs__tab" id="summary-tab" type="button" role="tab"
            aria-selected="true" aria-controls="summary-panel">
      Summary
    </button>
    <button class="av-tabs__tab" id="items-tab" type="button" role="tab"
            aria-selected="false" aria-controls="items-panel">
      Items
    </button>
    <button class="av-tabs__tab" id="history-tab" type="button" role="tab"
            aria-selected="false" aria-controls="history-panel">
      History
    </button>
  </div>

  <section id="summary-panel" role="tabpanel" aria-labelledby="summary-tab">
    Order summary
  </section>
  <section id="items-panel" role="tabpanel" aria-labelledby="items-tab" hidden>
    Order items
  </section>
  <section id="history-panel" role="tabpanel" aria-labelledby="history-tab" hidden>
    Order history
  </section>
</div>

AdminVora.init() gives the selected tab tabindex="0", removes inactive tabs from the normal tab order and keeps aria-selected and each panel's hidden state together. Left and right arrows move between tabs and reverse in RTL; up, down, Home and End also work. Selection is automatic.

Available visual modifiers are:

  • .av-tabs--line — the default underline treatment
  • .av-tabs--pill — filled, rounded choices
  • .av-tabs--enclosed — tabs joined visually to the panel below
  • .av-tabs--vertical — a vertical strip with the active rule on the inline edge

These are appearance modifiers only; the ARIA and runtime contract stays the same.

When selecting an item loads another URL, use links and .av-tab-nav. It deliberately does not use tab roles: a link promises navigation, while a tab promises an in-page panel.

html
<nav class="av-tab-nav" data-av-scrollnav aria-label="Account sections">
  <a class="av-tab-nav__link" href="profile.html" aria-current="page">Profile</a>
  <a class="av-tab-nav__link" href="security.html">Security</a>
  <a class="av-tab-nav__link" href="billing.html">
    Billing <span class="av-tab-nav__count">2</span>
  </a>
</nav>

data-av-scrollnav adds measured edge fades only when more links are hidden off-screen. Keep aria-current="page" on exactly one link and let normal browser navigation, history and deep links continue to work.

Steps ​

The stepper is a status summary for a linear process. State belongs in the enumerated data-av-state attribute: done, current or todo.

html
<ol class="av-steps" aria-label="Checkout progress">
  <li class="av-steps__item" data-av-state="done">
    <span class="av-steps__marker" aria-hidden="true">1</span>
    <span class="av-steps__label">Contact</span>
  </li>
  <li class="av-steps__item" data-av-state="current" aria-current="step">
    <span class="av-steps__marker" aria-hidden="true">2</span>
    <span class="av-steps__label">Delivery</span>
  </li>
  <li class="av-steps__item" data-av-state="todo">
    <span class="av-steps__marker" aria-hidden="true">3</span>
    <span class="av-steps__label">Payment</span>
  </li>
</ol>

Only the current item receives aria-current="step". The list lays out horizontally when space allows and stacks below the mobile breakpoint. In a wizard, data-av-wizard-steps lets the wizard runtime update these same states; the stepper itself is presentational and adds no navigation.

Pagination ​

Three arrangements over one element tree, so a list moves between them by changing a single class. AdminVora's data grid writes the numbered form into [data-av-grid-pages]; all three can be server-rendered when a page owns its own pagination logic.

ClassShowsUse it when
.av-paginationA result count and a windowed page listThe foot of a table, where jumping to a page is meaningful
.av-pagination--simplePrevious / "Page 2 of 27" / NextThe total is unknown, or nobody has a reason to jump to page 19
.av-pagination--compactIcon arrows around 2 / 27A toolbar or card header, where the bar cannot spend a row on itself

The <nav> is on .av-pagination__pages, not on the wrapper: the result count beside it is a status, not navigation, and a landmark that includes it is a landmark that overstates what it holds.

html
<div class="av-pagination">
  <span class="av-pagination__info" aria-live="polite">Showing 1–8 of 214</span>
  <nav class="av-pagination__pages" aria-label="Pagination">
    <button class="av-pagination__page" type="button" aria-disabled="true" aria-label="Previous page">
      Previous
    </button>
    <button class="av-pagination__page" type="button" aria-current="page">1</button>
    <button class="av-pagination__page" type="button">2</button>
    <button class="av-pagination__page" type="button">3</button>
    <span class="av-pagination__ellipsis" aria-hidden="true">…</span>
    <button class="av-pagination__page" type="button">27</button>
    <button class="av-pagination__page" type="button" aria-label="Next page">Next</button>
  </nav>
</div>
html
<div class="av-pagination av-pagination--simple">
  <nav class="av-pagination__pages" aria-label="Pagination">
    <button class="av-pagination__page" type="button">Previous</button>
    <span class="av-pagination__status" aria-live="polite">Page 2 of 27</span>
    <button class="av-pagination__page" type="button">Next</button>
  </nav>
</div>
html
<div class="av-pagination av-pagination--compact">
  <nav class="av-pagination__pages" aria-label="Pagination">
    <button class="av-pagination__page" type="button" aria-label="Previous page">‹</button>
    <span class="av-pagination__status" aria-live="polite">2 / 27</span>
    <button class="av-pagination__page" type="button" aria-label="Next page">›</button>
  </nav>
</div>

Previous and Next carry aria-disabled, never disabled ​

This is not a style preference, and the reason is specific to pagination. The disabled property removes an element from the tab order and the browser blurs it immediately — so pressing Next onto the final page destroys the focus of the very control that took you there, and the reader's next Tab starts again from "Skip to main content". aria-disabled leaves the button in place, announces it as disabled, and initActions enforces it with a capture-phase listener on document so the click genuinely cannot act.

Do not add pointer-events: none to a control marked this way. It stops the click before the guard can see it, and with it the announcement the guard makes to assistive technology.

For a server-routed list, use <a class="av-pagination__page" href="?page=2"> so URLs remain shareable and the browser's back button works. Use aria-current="page" for the current result page.

The status readout in the two reduced variants is aria-live="polite", because it is the only thing on screen that says the page changed — with no number list, a reader who cannot see the bar has nothing else to go on.

Breadcrumbs describe the current page's location. The separator is drawn by CSS and is not exposed to assistive technology.

html
<nav aria-label="Breadcrumb">
  <ol class="av-breadcrumb">
    <li><a href="dashboard.html">Dashboard</a></li>
    <li><a href="orders.html">Orders</a></li>
    <li aria-current="page">AV-1048</li>
  </ol>
</nav>

Keep trails short and preserve both ends when collapsing a deep hierarchy. Do not put a generated separator in the HTML or accessible name.

Disclosure tree ​

The file browser uses a nested list of buttons. data-av-tree-toggle owns disclosure state and updates the target named by aria-controls; data-av-folder identifies selectable folders for the page's file-filter behaviour.

html
<ul class="av-tree" aria-label="Folders">
  <li>
    <button class="av-tree__link" type="button" data-av-folder="all"
            data-av-folder-name="All files" aria-current="true">
      All files <span class="av-tree__count">9</span>
    </button>
  </li>
  <li>
    <button class="av-tree__link" type="button" data-av-tree-toggle
            aria-expanded="true" aria-controls="project-folders">
      <svg class="av-icon av-tree__twisty" aria-hidden="true" viewBox="0 0 24 24">
        <path d="M9 6l6 6-6 6"/>
      </svg>
      Projects
    </button>
    <ul id="project-folders">
      <li>
        <button class="av-tree__link" type="button" data-av-folder="brand"
                data-av-folder-name="Brand" aria-current="false">
          Brand <span class="av-tree__count">3</span>
        </button>
      </li>
    </ul>
  </li>
</ul>

This is a disclosure list, not an ARIA tree widget: buttons keep native keyboard behaviour, and the nested lists keep their list semantics. Add the full ARIA tree-view roles only with the complete roving-focus and arrow-key interaction model.

Keyboard shortcuts ​

Shortcuts are declared on the real controls they activate. The runtime builds the help dialog from the same attributes, so the visible reference cannot drift away from the bindings.

html
<div class="av-visually-hidden" data-av-shortcut-shell
     data-av-shortcut-group="Navigation">
  <a href="orders.html" data-av-shortcut="g o: Go to orders">Orders</a>
</div>

<button type="button" data-av-shortcut="c: Compose a message">Compose</button>

<dialog class="av-dialog av-dialog--sm" data-av-shortcuts
        aria-labelledby="shortcut-title">
  <div class="av-dialog__inner">
    <div class="av-dialog__header">
      <h2 class="av-dialog__title" id="shortcut-title">Keyboard shortcuts</h2>
      <button class="av-close" type="button" data-av-modal-close aria-label="Close">
        Close
      </button>
    </div>
    <div class="av-dialog__body">
      <dl class="av-shortcut-list" data-av-shortcuts-list></dl>
    </div>
  </div>
</dialog>

The text before : is the key sequence and the text after it is the description. A space creates a chord such as g then o. The sequence times out after 1.2 seconds; Escape cancels it. Shortcuts do not fire while someone is typing or while another dialog is open. Keep shell bindings visually hidden, not hidden, because the runtime activates the real element with a click.

Accessibility checklist ​

  • Tabs have a labelled tablist, connected tabs and panels, and one selected tab.
  • Link navigation uses a labelled nav and one aria-current="page"; it does not borrow tab roles.
  • The current step has aria-current="step" and state text is not communicated by colour alone.
  • Pagination exposes the current page, has named previous and next controls, and announces updates.
  • Every page with multiple navigation landmarks gives each one a distinct accessible name.
  • Disclosure buttons keep aria-expanded and the controlled list's visibility together.
  • Directional icons are drawn inline and are mirrored by the component's RTL styles.
  • Single-key shortcuts never steal input from form controls or editable content.

Read next: Feedback & Overlays.

Documentation for @creativeigniter/adminvora