Accessibility in ASP.NET MVC Chips

17 Aug 20261 minute to read

Keyboard interaction

The following shortcut keys are used to access the Chips control without interruption.

Keyboard shortcuts Actions
Enter Selects the targeted Chips from the ChipList/ChipCollection.
Delete Deletes the targeted Chips from the ChipList/ChipCollection.
@Html.EJS().ChipList("chip-avatar").EnableDelete(true).Selection(Selection.Single).Chips(chip =>
                        {
                            chip.Text("Andrew").avatarIconCss("andrew").Enabled(true).Add();
                            chip.Text("Janet").avatarIconCss("janet").Enabled(true).Add();
                            chip.Text("Laura").avatarIconCss("laura").Enabled(true).Add();
                            chip.Text("Margaret").avatarIconCss("margaret").Enabled(true).Add();
                        }).Render()

<style>
  #chip-avatar .andrew {
    background-image: url('./andrew.png')
  }

  #chip-avatar .margaret {
    background-image: url('./margaret.png')
  }

  #chip-avatar .laura {
    background-image: url('./laura.png')
  }

  #chip-avatar .janet {
    background-image: url('./janet.png')
  }
</style>
public IActionResult Index()
    {
            return View();
    }

NOTE

View Sample in GitHub.