Front End Help

Actions Pattern

Actions are links and form inputs, which we style to look like buttons.

It’s a very loose pattern, but it’s normally a list of links. On most pages, there is an unordered actions list straight after the h2 page heading. Actions can show up anywhere, however, in any group, zone, region, or interaction.

The actions styles are declared in the style sheet named 08-actions.css. They are a supertype.

Rules

Actions can be any element that contains one or more actions. While actions frequently appear in groups marked up as unordered lists (<ul class="actions">), single actions are often seen inside paragraphs (<p>) or descriptions (<dd>) with the action class applied to the containing element (rather than the link or input).

Nested actions blocks have the class secondary, which is a general modifier.

Only simple forms should be included inside actions blocks.

XHTML diagram

  1. <ul class="navigation actions" role="navigation">
    1. <li>
      1. <a>
    2. <li>
      1. <span class="current">
    3. <li aria-haspopup="true">
      1. <a>
      2. <ul class="secondary">
        1. <li>
          1. <a>
        2. <li>
          1. <a>
    4. <li>
      1. <a>

Subtypes of actions

Actions and landmark headings

Sometimes actions blocks are announced by a landmark heading. This is a case-by-case decision and must not be done reflexively, only where it is properly useful, like where there are lots of different kinds of actions blocks grouped, or where a user is probably going to load a page and go directly to a specific action. So, in layout, you can’t rely on an actions block being directly preceded by a heading.

ARIA roles and states

As well as Archive roles and states, actions can have ARIA roles and states.

role="navigation"
a block of mostly links that take you to other places
role="menu"
a block of mostly form buttons (like submit, select, destroy)
role="button"
a single button in a navigation block, or a button on its own
aria-haspopup="true"
has a hidden secondary block