The below example section demonstrates a tabs widget that implements the design pattern for tabs.


Nils Frahm is a German musician, composer and record producer based in Berlin. He is known for combining classical and electronic music and for an unconventional approach to the piano in which he mixes a grand piano, upright piano, Roland Juno-60, Rhodes piano, drum machine, and Moog Taurus.

Keyboard Support

Key Function
tab Moves focus to the active tab or first focusable in the tab panel.
left arrow Moves focus to the previous tab.
right arrow Moves focus to the next tab.
home Moves focus to the first tab.
end Moves focus to the last tab.
delete If deletion on the selected tab is allowed this will that tab element and its associated tab panel.

ARIA Roles, Properties, and States

Role Property/State Element Usage
  • Serves as the container for the set of tabs.
  • Contains title for tab panel, activates tab panel when activated.
  • Contains the tab’s associated content.
aria-controls element with role of tab

Javascript and CSS Source Code

HTML Source Code