Appian SAIL Accessibility Checklist and Examples

How to use this reference:

On this page:

Inputs and Controls

Content

Tips

Examples

To test out these SAIL snippets, you copy and paste them into the code editor on this page and press EVALUATE. Some examples use internal-only functions and may not render.

Inputs

Text field (standard)

a!textField(
  label: "Email",
  labelPosition: "ABOVE",
  inputPurpose: "EMAIL",
  instructions: "Remember to check your spam folder",
  required: true
)

Text field (custom)

a!sideBySideLayout(
  items: {
    a!sideBySideItem(
      item: a!richTextDisplayField(
        labelPosition: "COLLAPSED",
        value: a!richTextItem(text: "Full name", size: "MEDIUM"),
        marginBelow: "NONE",
        preventWrapping: true
      ),
      width: "MINIMIZE"
    ),
    a!sideBySideItem(
      item: a!textField(
        label: "Full name",
        labelPosition: "COLLAPSED",
        saveInto: {},
        refreshAfter: "UNFOCUS",
        validations: {},
        
      )
    )
  },
  alignVertical: "MIDDLE",
  spacing: "SPARSE"
)

Checkbox (multi-item inputs)

a!checkboxField(
  choiceLabels: {
    "Honey bee",
    "Bumblebee",
    "Carpenter bee"
  },
  choiceValues: { 1, 2, 3 },
  label: "Bees",
  labelPosition: "ABOVE",
)

Checkbox (single checkbox selection)

a!checkboxField(
  label: null,
  labelPosition: "COLLAPSED",
  choiceValues: true,
  choiceLabels: "I agree to these terms",
  required: true
)

Validation message

a!localVariables(
  local!value: "me@emailcom",
  a!textField(
    label: "Email",
    labelPosition: "ABOVE",
    inputPurpose: "EMAIL",
    instructions: "Remember to check your spam folder",
    required: true,
    value: local!value,
    validations: "Please enter a valid email address"
  )
)

Buttons

Button with redundant image

a!buttonArrayLayout(
  buttons: {
    a!buttonWidget(
      icon: "search",
      label: "Search",
    )
  }
)

Button with meaningful image

a!buttonArrayLayout(
  buttons: {
    a!buttonWidget(
      icon: "folder",
      label: "Search",
      accessibilityText: "Folder"
    )
  }
)

Icon Button

a!buttonArrayLayout(
  buttons: {
    a!buttonWidget(
      icon: "search",
      style: "OUTLINE",
      accessibilityText: "Search records"
    )
  }
)

Cards

Linked cards

a!cardLayout(
  contents: a!richTextDisplayField(
    labelPosition: "COLLAPSED",
    value: {
      a!richTextHeader(text: "A Special Button"),
      a!richTextItem(text: "For when regular buttons just won’t do")
    },
    align: "CENTER"
  ),
  shape: "ROUNDED",
  link: a!dynamicLink(value: true)
)

Visual Content

Images

a!imageField(
  labelPosition: "COLLAPSED",
  images: a!webImage(
    source: "https://docs.appian.com/suite/help/23.4/images/design-sys/sail_welcome_illustration.png",
    altText: "Abstract illustration of two people collaboratively building an interactive website"
  )
)

Icons (Not Universally Known)

a!richTextDisplayField(
  labelPosition: "COLLAPSED",
  value: {
    a!richTextIcon(
      icon: "brain",
      caption: "Artificial Intelligence"
    )
  }
)

Icons (Universally Known)

a!richTextDisplayField(
  labelPosition: "COLLAPSED",
  value: {
    a!richTextIcon(
      icon: "search",
      altText: "Search"
    )
  }
)

Lists

Bulleted Lists

a!richTextDisplayField(
  labelPosition: "COLLAPSED",
  value: {
    a!richTextBulletedList(
      items: {
        "First",
        "Second",
        "Third",
        a!richTextItem(text: "Fourth", style: "EMPHASIS"),
        "Fifth"
      }
    )
  }
)

Numbered Lists

a!richTextDisplayField(
  labelPosition: "COLLAPSED",
  value: {
    a!richTextNumberedList(
      items: {
        "First",
        "Second",
        "Third",
        a!richTextItem(text: "Fourth", style: "EMPHASIS"),
        "Fifth"
      }
    )
  }
)

Grids

Simple Grid

a!localVariables(
  local!data: todatasubset(
    arrayToPage: {
      a!map(
        name: "Gray Light",
        hex: "#F0F0F0",
        group: "UI"
      ),
      a!map(
        name: "Charcoal Mercury Highlight",
        hex: "#99A8C5",
        group: "Theme"
      ),
      a!map(
        name: "Info Foreground",
        hex: "#2C5791",
        group: "State"
      ),
      
    }
  ).data,
  {
    a!gridField(
      label: "Colors",
      labelPosition: "ABOVE",
      data: local!data,
      columns: {
        a!gridColumn(
          label: "Name",
          sortField: "name",
          value: fv!row.name,
          backgroundColor: if(fv!identifier = 3, "#ECF4FF", {}),
          accessibilityText: if(fv!identifier = 3, "New", {})
        ),
        a!gridColumn(
          label: "Hex",
          sortField: "hex",
          value: fv!row.hex,
          backgroundColor: if(fv!identifier = 3, "#ECF4FF", {})
        ),
        a!gridColumn(
          label: "Group",
          sortField: "group",
          value: fv!row.group,
          backgroundColor: if(fv!identifier = 3, "#ECF4FF", {})
        )
      },
      rowHeader: 1
    )
  }
)

Patterns

a!localVariables(
  local!currentPage: 4,
  local!pages: {
    "Home",
    "My Documents",
    "Strategy",
    "2018 Road Map"
  },
  a!richTextDisplayField(
    accessibilityText: "Breadcrumb",
    labelPosition: "COLLAPSED",
    value: {
      a!forEach(
        items: local!pages,
        expression: if(
          fv!isLast,
          a!richTextItem(text: fv!item, style: "STRONG"),
          {
            a!richTextItem(
              text: fv!item,
              link: a!dynamicLink(
                saveInto: {
                  a!save(
                    target: local!currentPage,
                    value: fv!index
                  ),
                  a!save(
                    local!pages,
                    rdrop(
                      local!pages,
                      length(local!pages) - fv!index
                    )
                  )
                }
              ),
              linkStyle: "STANDALONE"
            ),
            " ",
            a!richTextIcon(icon: "angle-right", color: "SECONDARY"),
            " "
          }
        )
      )
    }
  )
)

Cards with nested menu buttons

a!localVariables(
  local!fruits: { "Blueberries", "Kiwis", "Strawberries" },
  a!forEach(
    items: local!fruits,
    expression: a!cardLayout(
      contents: a!sideBySideLayout_internal(
        items: {
          a!sideBySideItem(
            item: a!richTextDisplayField(
              value: a!richTextItem(
                text: fv!item,
                link: a!dynamicLink(),
                linkStyle: "STANDALONE"
              )
            )
          ),
          a!sideBySideItem(
            item: a!menuLayout(
              label: null,
              icon: "ellipsis-v",
              style: "LINK",
              size: "SMALL",
              ariaLabel: fv!item & " Actions",
              options: {
                a!menuLayoutOption(primaryText: "Edit"),
                a!menuLayoutOption(primaryText: "Duplicate"),
                a!menuLayoutOption(primaryText: "Archive"),
                a!menuLayoutOption(primaryText: "Delete")
              },
              hasPulldown: false
            ),
            width: "MINIMIZE"
          )
        }
      ),
      marginBelow: "LESS"
    )
  )
)

Tabs using buttons

a!localVariables(
  local!tabs: { "Summary", "News", "Related Actions" },
  local!selectedTab: 1,
  {
    a!buttonArrayLayout(
      buttons: a!forEach(
        items: local!tabs,
        expression: a!buttonWidget(
          label: fv!item,
          saveInto: if(
            local!selectedTab = fv!index,
            {},
            a!save(local!selectedTab, fv!index)
          ),
          width: "MINIMIZE",
          style: if(
            local!selectedTab = fv!index,
            "SOLID",
            "LINK"
          ),
          accessibilityText: if(
            local!selectedTab = fv!index,
            "Selected",
            {}
          )
        )
      )
    ),
    a!richTextDisplayField(
      labelPosition: "COLLAPSED",
      value: a!richTextItem(
        text: a!match(
          value: local!selectedTab,
          equals: 1,
          then: "The contents of the first tab would go here",
          equals: 2,
          then: "The contents of the second tab would go here",
          equals: 3,
          then: "The contents of the third tab would go here",
          default: "Something went wrong."
        ),
        style: "EMPHASIS"
      ),
      align: "CENTER"
    )
  }
)

Return to top

View on GitHub