testRolesAndStates() {
    function checkActiveDescendant(activeDescendant) {
      assertNotNull(inputElement);
      assertEquals(aria.getActiveDescendant(inputElement), activeDescendant);
    }
    function checkRole(el, role) {
      assertNotNull(el);
      assertEquals(aria.getRole(el), role);
    }
    const ds = new MockDS();
    const rend = new TestRend();
    /** @suppress {checkTypes} suppression added to enable type checking */
    const select = new MockSelect();
    const ac = new AutoComplete(ds, rend, select);
    ac.setTarget(inputElement);

    // initially activedescendant is not set
    checkActiveDescendant(null);

    // highlight the matching row and check that activedescendant updates
    ac.setToken('');
    ac.setToken('the');
    ac.hiliteNext();
    checkActiveDescendant(rend.getHilitedRowDiv());

    // highligted row should have a role of 'option'
    checkRole(rend.getHilitedRowDiv(), Role.OPTION);

    // closing the autocomplete should clear activedescendant
    ac.dismiss();
    checkActiveDescendant(null);
  }
Ensure that activedescendant is updated properly.