selected property

  1. @override
  2. @Accessor(key: 'aria-selected')
dynamic selected

Indicates the current 'selected' state of various widgets. See related aria-checked and aria-pressed.

This attribute is used with single-selection and multiple-selection widgets:

Single-selection containers where the currently focused item is not selected. The selection normally follows the focus, and is managed by the user agent.Multiple-selection containers. Authors SHOULD ensure that any selectable descendant of a container in which the aria-multiselectable attribute is true specifies a value of either true or false for the aria-selected attribute.

Any explicit assignment of aria-selected takes precedence over the implicit selection based on focus. If no DOM element in the widget is explicitly marked as selected, assistive technologies MAY convey implicit selection which follows the keyboard focus of the managed focus widget. If any DOM element in the widget is explicitly marked as selected, the user agent MUST NOT convey implicit selection for the widget.

See: developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected

Implementation

@override
@Accessor(key: 'aria-selected')
dynamic get selected =>
    (props[_$key__selected___$AriaPropsMixin] ?? null) as dynamic;
  1. @override
  2. @Accessor(key: 'aria-selected')
void selected=(dynamic value)

Indicates the current 'selected' state of various widgets. See related aria-checked and aria-pressed.

This attribute is used with single-selection and multiple-selection widgets:

Single-selection containers where the currently focused item is not selected. The selection normally follows the focus, and is managed by the user agent.Multiple-selection containers. Authors SHOULD ensure that any selectable descendant of a container in which the aria-multiselectable attribute is true specifies a value of either true or false for the aria-selected attribute.

Any explicit assignment of aria-selected takes precedence over the implicit selection based on focus. If no DOM element in the widget is explicitly marked as selected, assistive technologies MAY convey implicit selection which follows the keyboard focus of the managed focus widget. If any DOM element in the widget is explicitly marked as selected, the user agent MUST NOT convey implicit selection for the widget.

See: developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected

Implementation

@override
@Accessor(key: 'aria-selected')
set selected(dynamic value) =>
    props[_$key__selected___$AriaPropsMixin] = value;