Most design systems recommend homogeneity in the same Tab Bar (that is, against mixing modes of combination of text/icon). Some actively enforce this, via API, some don’t.
There are some well established expectations with regard to internationalization for certain parts of Tab Sets. In right-to-left languages, for example, generally speaking some kind of RTL mirroring applies - however, it will work differently depending on a number of other factors. Some of these are very well established, others less so. For example, when tabs are grouped in the in the horizontal top position, in RTL the order of the tabs is reversed, and the icon/text flip too. Keyboard controls, however, continue to maintain spatial order (that is, pressing ‘left arrow’ will move selection to the tab displayed to the left of the currently selected and so on. First and last shortcuts will be impacted as per the directionality. As systems add additional elements or orientations this becomes slightly less clear.
If the component offers some additional affordance for overflow (see overflow), for example, this may or may not have effects (paging or next/back buttons would work spatially, while a dropdown should appear to the left but options would be in …document order?).
Mirroring should work similarly in horizontal bottom positioning. However, if left and right positioned tabs are supported, they will reverse the order of their alignment and their icon/text relationship, but not the order of the tabs themselves.
Some systems also support an explicit mode for aligning the icon on its own line at the top, above the text
Note that as top icons are in the block direction, they are generally unchanged during RTL mode mirroring.
The most common, traditional definitions of Tab Sets involve the Tab List being visually grouped together. Over the years this definition has expanded from a simple ‘grouped along the top edge of the content’ to considerably more variable ideas. Some of the positioning schemes for grouped Tab Lists allow authors to express the alignment of the group, such that tabs appear grouped at the left, in the center, or on the right (though, how this should work with mirroring is an area that is less well defined).
This section looks at common orientations of the grouped tabs and support for this feature in different systems. Because of unevenness and confusion around how these work with writing modes, we are listing them in the cardinal directions and including a logical direction alternative in parens.
All implementations support this view, somehow (in some cases only the Tab Bar is provided). It is the original view, most vanilla associated with the mental image of tabs with the group aligned to the top edge of content. Where they diverge slightly is largely in regard to how they handle overflow (see behaviors > overflow in this document). Note: Some can switch any (automatically or via attribute) to ungrouped/inline.
System | Screenshot/Notes |
---|---|
Ant design | |
Atlaskit | |
Carbon Design | |
Fast | |
Lightning Components | |
Material (TabBar) | |
Origami | |
Semantic-UI | It seems the component that is called tabs here is actually a mutally exclusive selection of items for content - a tab list is wholly separate a concern here, an exercise left to authors as a menu - but it seems it could be said to loosely support this |
Shoelace | |
Vaadin |
Many tabs implementations also support tabs grouped along the left edge of the content. Note: Some, like ant design, automatically switch these to top aligned on mobile devices. Others can switch any (automatically or via attribute) to ungrouped/inline.
System | Screenshot/Notes |
---|---|
Ant design | |
Atlaskit | Not supported |
Carbon | Not supported |
Fast | |
Lightning Components | |
Material | Not supported |
Origami | Not supported |
Redhat | |
semantic-ui | It seems the Tab List is wholly separate a concern here, an exercise left to authors generally triggered by a menu, so.. unclear? |
Shoelace | |
Vaadin |
Some tabs implementations support tabs grouped along the right edge of the content, though, again - how this works with internationalization is not entirely clear. Note that the accessibility characteristics of this seem unchanged. Note: Some, like ant design, automatically switch these to top aligned on mobile devices. Others can switch any (automatically or via attribute) to ungrouped/inline.
System | Screenshot/Notes |
---|---|
Ant design | |
Atlaskit | Not supported |
Carbon | Not supported |
Fast | (only supports vertical + direction which isn’t the same exactly but is maybe better) |
Lightning Components | Not supported |
Material | Not supported |
Origami | Not supported |
Redhat | |
semantic-ui | It seems the Tab List is wholly separate a concern here, an exercise left to authors generally triggered by a menu, so.. unclear? |
Shoelace | TODO: missing screenshot from https://shoelace.style/components/tab-group |
Vaadin |
Some tabs implementations support tabs grouped along the right edge of the content, though, again - how this works with internationalization is not entirely clear. Note that the accessibility characteristics of this seem unchanged.
System | Screenshot/Notes |
---|---|
Ant design | |
Atlaskit | Not supported |
Carbon Design | Not supported |
Fast | Not supported? |
Lightning Components | Not supported |
Material | (technically perhaps partially supported by the fact that it is separated from content, but the guidelines suggest don’t) |
Origami | Not supported |
semantic-ui | It seems the Tab List is wholly separate a concern here, an exercise left to authors generally triggered by a menu, so.. unclear? |
Shoelace | |
Vaadin | (bar only, though technically perhaps partially supported by the fact that it is separated from content) |
Note: Some can switch any (automatically or via attribute) to ungrouped/inline.
Just as over time we have expanded many common definitions to include labels grouped on any of four sides, it is reasonable to expect that new ideas will continue to explore new visualizations of which require similar qualities in terms of necessarily semantic parts, required interactions, events, etc.
These components, which fit the description we have provided, are developing and not uncommon thanks to pressures from things like web interfaces providing for IoT, video games and even the needs of simple responsive design. Given that we are looking at components in systems with diverse names and qualities it is difficult to discuss if or how these aspects are considered, the support and qualities (including naming) vary significantly from no consideration of these uses to responsive components that respond and switch their types fluidly. As such, we have simply provided examples and explanations of these types for consideration.
Responsive design, particularly, has changed the way we consider, approach and name some things. Grouped tabs can be re-visualized vertically and un-grouped and with content interwoven without changing anything about state, semantics, functionality, etc.
RedHat is a another example of a component which, below a certain breakpoint will “become” vertical, though their vertical tabs remain grouped and they adapt by changing the overflow affordances.
Grouped tabs can be re-visualized horizontally and un-grouped and with content interwoven without changing anything about state, semantics, functionality, etc. These are currently more popular in video games and IOT with more predictable and fixed viewport sizes.
Grouped tabs can be re-visualized along a curve without changing anything about state, semantics, functionality, etc. These are currently more popular in video games and IOT.
Some systems attempt to simply support some kind of center alignment of the grouping of horizontal tabs. Some systems also advise not trying to change whatever styling boundaries on this it places by default.
Examples:
While basic concepts of rendering the various parts in each of the discussed Tab List positions there is anything but clarity around what to do when there are too many Tab Labels to fit on the screen in the current direction Some systems, clip tabs increasingly smaller and force fit. Others, like Ant Design try to make sure the text of tabs is visible and provide new affordances and offer a drop down, but this is rare. Others offer before and after interactive arrow affordances which appear or disappear as needed. This is also rare, however, in some cases this advances a single tab, and in others it merely scrolls forward or backward a visible ‘page’ of tabs. Others force tabs to wrap and stack, while still others simply overflow and allow clipping and allow the user scroll via keyboard focus or drag without scrollbars. These also differ in terms of scroll snapping.
Below are a sampling of differences.
Fast does not currently explicitly support anything in particular here, but they are working on it.
A rarely occurring enhancement, but not entirely uncommon and seemingly growing in popularity is providing a visual transition effect between the finite states of tabs. It it worth considering a feature on its own in the sense that there are several implementations which are built in such a way that this is not possible to achieve.
A few systems allow the “disabling” of individual tab labels. While this is not extremely common, it is not entirely rare either. Some particularly interesting things to note here are:
Some Tab Sets allow programatic and sometimes user-triggered items that are “dismissible” or, as referred to in ARIA practices as “deletable” or, sometimes “closable” or “removable”.
Note that while this optional feature is mentioned in ARIA Practices and keyboard affordances are well-specified, there seem to be disagreements in implementations about whether a semantic/visual affordance belongs in the sequential focus order.
Note that if tabsets are ‘dismissable’ they can also be ‘entirely dismissable’ (the entire control disappears) or they have to deal with what happens when only one tab remains. It seems the choice to support this, not support it, or how to deal with whether they are individually, as a whole, or only as long as more than one remains varies quite a bit, though realistically without 2 (that are not disabled) it gets more difficult to really call them “tabs”, thus many design systems at least recommend, if not require minimum of two. In many windowing toolkits, “dismissable” cases are dealt with extensions to a common interface and not called ‘tabs’, or ‘tabs’ has a narrower definition in one direction or the other.
This might be thought of to go hand in hand with the ability to add a tab, and while not uncommon in programmatic APIs, it is considerably more rare from a user interface point of view and there aren’t plentiful ideas in practice from libraries to draw from.
While exceptionally rare in our survey of components, the idea that individual tab labels can include a context menu was common enough that keyboard shortcuts for this it is included in ARIA Practices. Several components accept rich content in tab labels (more than strings) and so in theory might be said to allow rather than support this, however it has some interesting challenges. Like dismiss buttons there are some accessibility characteristic of this that are not entirely clearly specified and popular web based implementations are uncommon enough that it was not easy to find good discussion abut how, for example, a visual affordance should affect sequential focus or how these swap/mirror in RTL. How this winds up working out with other potential extra (rare) tab label elements would require some additional investigation.
Some Tab Sets allow users to drag Tab Labels and reorder them in the Tab List (note this is in part based on the common guidance that there is no stateful relationship or order importance of the tabs - see disabled tab labels). This is fairly rare on the web, but some allow it. Some also allow tabs to be dragged into and out of their tab lists, though outside of browsers themselves this appears to be very rare.
Some tabsets allow you to embed extra interactive elements into the grouped tablist (or maybe it is surrounding it visually?). This is certainly not universal or uniform and the interaction patterns and a11y are not well established as a generic mechanism. It may be the intent that these are intended to allow some of the extended things that other implementations attempt to provide.
While many APIs would allow complex content in a tab label, at least Lightning Component provide a specific “state indicator” built into the component itself indicating that this tab needs attention. It is interesting to consider whether there are implications on swap/mirroring in RTL of either approach. It is also worth considering how this relates to the question of statefulness in this component, where precisely that line is drawn (this is arguably a contained state that doesn’t affect others), as well as how such information is communicated accessibly.
Some components build into their implementations an idea of content which is lazily loaded and introduce a state for this that the component can manage efficiently, and potentially containing some concept similar to ‘onload’ allowing script to be included and run, but only once. Mostly this is something at the API rather than the user facing interface level but it is somewhat related to Tab State Indicators and in some cases will provide a default (or customizable) loading animation or text during this period.
See https://semantic-ui.com/modules/tab.html#retreiving-remote-content as an example
While many APIs would allow complex content in a tab label, at least Lightning Component provide a specific “state indicator” built into the component itself indicating the “status” of this tab with some additional information. Examples of the intent and meaning of “status” help differentiate it from “state”: unsaved, noisy, unread, for example. This is exceptionally rare and most of the comments related to Tab state apply equally here.
Some tabs implementations include a mechanism for linking to content within a particular tab in order that it can be shown. This is similar to requests in the native Web Platform to allow links that point to content inside of details elements to automatically ensure that their state is exapanded properly and the content scrolled to correctly.