Class RowsContract

java.lang.Object
limn.testing.a11y.RowsContract

public final class RowsContract extends Object
What every widget of the ROWS shape owes a reader, as named cases over a RowsSubject. Each case builds the subject fresh, binds it headlessly, reads the tree the scene published and drives verbs into it the way a platform does. The rules are the ones decided for rows, one case each, so that a regression a reader found once in one widget is refused in every widget of the shape:
  • SELECT means a click and replaces the selection; ADD_TO_SELECTION joins it and DESELECT leaves it, offered by state and only where there is a multiple selection;
  • FOCUS is offered on a row only where it moves the cursor without selecting, and refused where the cursor is the selection;
  • a row's verbs are the row verb set and nothing else, with EXPAND and COLLAPSE by state;
  • a SELECT that arrives from a client selects the row addressed, announces one selection change from the user, and leaves the cursor where it was — unless the cursor is the selection, in which case it follows;
  • a row that offers PRESS activates itself, not the cursor;
  • a row of a widget that scrolls offers SCROLL_INTO_VIEW, and the verb brings it into the box.
Plus what any tree owes (AccessibleInvariants), that a row keeps its id while the selection and the cursor move, and that the cursor is published only while the widget has the keyboard.

A member is a node carrying a SelectionItemFacet; the container is the node its selectionContainer resolves to, or, for a subject whose members are containerless (a radio group), their common parent, which carries no facet. The members may classify as ROWS (a list's rows, a tree's, a table's) or as GRID (a calendar's day cells), because a grid is rows whose members carry cells: the rules are the selection's, not the row's role's.

  • Field Details

    • ROW_VERBS

      public static final Set<Accessible.Action> ROW_VERBS
      The verbs a row may carry; the walk's free verbs are among them.
  • Method Details

    • cases

      public static List<ContractCase> cases(RowsSubject subject, UiRuntime runtime)
      The cases, in the order above.
      Parameters:
      subject - the widget under contract
      runtime - the installed runtime the harness drains verbs through
      Returns:
      the cases; a test runs each as a dynamic test