itemsRole property

  1. @override
String get itemsRole
override

The role attribute each menu item should apply.

The role attribute is used for a11y purposes and should be the same for each menu item in a group. For selectable menu items the possible roles are menuitemcheckbox or menuitemradio. https://www.w3.org/TR/wai-aria-1.1/#menuitemradio https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox

Implementation

@override
String get itemsRole => selectionModel.isSingleSelect
    ? 'menuitemradio'
    : 'menuitemcheckbox';