You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
RadioGroup::act lets an agent choose an option with Action::Select, answering Outcome::Changed, Outcome::Handled when it was already chosen, and Outcome::Ignored for a disabled or missing option and for any other action.
Select::act lets an agent choose an option by its exact label with Action::SetValue for the app's choice, answering Outcome::Changed, Outcome::Handled when it was already chosen, and Outcome::Ignored for a label that names no option and for any other action. Opening the list stays with the app's layer.
TableState::act lets an agent put the table's cursor on a row with Action::Select or Action::Activate, and TableState::act_header sorts by a column header with Action::Activate, reversing the order when the column is already sorted. A row or column that does not exist, and any other action, give Outcome::Ignored.
An agent can act on more widgets. Slider::act and NumberInput::act set a value from Action::SetValue (clamped, and snapped to the step or rounded to the decimals), Accordion::act opens or closes a section on Action::Toggle, TreeState::act selects a node or opens a branch on Action::Select and Action::Activate, TagState (new) takes typed text with SetValue and commits it as a tag with Activate, and Date implements Act for a YYYY-MM-DD value. ActWith lends Act to a closure so Request::apply can drive state that a widget bounds. Three roles are new, AccessibilityRole::Disclosure (disclosure), TagInput (tag_input) and Calendar (calendar), with their action lists in the snapshot. docs/named-controls.md has a table of widgets, roles and actions. A control the widget would not accept, such as text that is not a number or a date that does not exist, is Outcome::Ignored and changes nothing.