Carlie Bradshaw

Description

Tag inputs allow multiple metadata tags to be added to a piece of content from a pre-defined set. Categorising content with tags can make it easier to find, instigate workflows, or define access permissions.

Common tagsets include department, region, product, and personal information such as email addresses.

Note: Where tags are subsequently being used to filter content, use the Filter Pane.

Types

Type

Usage

Image

Browsable list

Users may not know what the options are, and need to browse the entire list of available tags.

Users may not know the exact terminology used for the tag labels.

For small-to-medium size tagsets.

Auto-complete

Users know what they are looking for, and do not need to browse the entire list of available tags.

Users are likely to know the exact labels for the tags they’re looking for.

For large tagsets.

Usage & Behavior

General guidelines

Each tagset should have its own tag input.

Structure

Browsable list

A browsable list tag input consists of:

Auto-complete

An auto-complete tag input consists of:

Default State

Internal Logic

Search

Tag field

Tag menu ordering

Pill ordering

States

For the states of the tag menu list items, follow:

State

Browsable list tag field

Auto-complete tag field

Applied tag pill

Regular

Hover

On hover over Close icon button:

Active

Disabled

Error

N/A?

Warning

N/A?

Focused

Interaction

Browsable list

The tag menu will be opened when the user clicks on either:

Tag menu

The search field will be focused by default when the menu is first opened.

Auto-complete

Tag field

Tag menu

Applied tag pills

Validation and Errors

The tag menu should show an empty state when a search has no matching tags.

Best practices

General

Use:

Don’t use:

Accessibility Compliance

Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility.

Focus management

Browsable list tag field

Keyboard

Description

Tab

  • From a previous component, moves focus to the trigger button.

  • From the trigger button, navigates to the next component.

Shift + Tab

Reverse tab

Space

  • Selects the trigger button to open the tag menu, or

  • focuses the pill (for tooltips).

Enter

  • Selects the trigger button to open the tag menu, or

  • focuses the pill (for tooltips).

Delete

On the trigger button: removes the last pill, de-selecting the tag.

On a pill: removes the pill, de-selecting the tag.

Esc

On the trigger button: N/A

On a pill: removes the pill, de-selecting the tag.

Arrows

Left/Right: move between the pills and trigger button.

Auto-complete tag field

Keyboard

Description

Tab

  • From a previous component, moves focus to the first pill in the list.

  • Moves between the pills.

  • After the last pill, moves to the text field.

  • From the text field, navigates to the next component.

Shift + Tab

Reverse tab

Space

On a pill: focuses the pill (for tooltips)

On the text area: as text input.

Enter

On a pill: focuses the pill (for tooltips).

On the text area: opens the tag menu.

Esc

Removes the pill, de-selecting the tag.

Delete

On a pill: removes the pill, de-selecting the tag.

On the text area: as text input. After all text deleted, removes the last added pill.

Arrows

Left/Right: move between the pills and text area.

a-z, A-Z

Automatically moves focus/cursor to right of the last pill and starts to search.

Tag menu

Follow https://kanasoftware.jira.com/wiki/spaces/UserExp/pages/1273110308/List#Focus-management

Design

Zeplin link

Screen thumbnail

<<Short Zeplin link. YouUse this >>

<<Screen with 200 width>>



Code

<<a box containing the code - discuss with Femi>>