Skip to content

Can't use keyboard/controller to press Reset Buttons (accessibility) #343

Description

@mfishma

When navigating a YACL config screen using Tab on a keyboard (or a controller via Controlify), I can't trigger the "reset to default" button on individual option rows. The button receives the visual focus when tabbed to, but pressing Space or Enter (or 'A'/Cross on a controller) does nothing. And I think Controlify maps gamepad button activation directly to these standard keyboard focus events, so it breaks the ability for controller users to reset individual options, too.

Repro steps

  1. Open any mod configuration screen built with YACL that has options capable of being reset.
  2. Change a setting so that its value is different from the default (which enables the small reset icon button on the right).
  3. Use the Tab key to navigate through the UI until the small Reset button for that option is focused.
  4. Press Space or Enter.

Expected:
The setting reverts to its default value, like as if the reset button was clicked on.

Actual:
Nothing happens. The key press is swallowed and the setting doesn't change.

My AI says

"Because OptionEntry#keyPressed hardcodes the event routing to return widget.keyPressed(event);, it drops all KeyEvents meant for the resetButton. This means any accessibility tools or controller mods (specifically Controlify's ScreenOp system) that rely on dispatching synthetic ENTER/SPACE KeyEvents to the focused element will silently fail. Controller users are completely unable to press the reset button."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions