AccessKit / accesskit

UI accessibility infrastructure across platforms and programming languages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

access_kit_winit Adapter::on_event is confusingly named and undocumented

alice-i-cecile opened this issue · comments

This call seems to propagate winit events into access_kit in order to be handled correctly.

The boolean returned seems to reflect whether or not the event should be filtered and absorbed, per bevyengine/bevy#10239 (comment), but currently always returns true across platforms. This is particularly confusing because the wrapping struct (of the same name)'s method is marked #[must_use].

I'm new to accesskit's codebase, but a few requests to ease integration:

  1. Rename on_event to something that clearly indicates that there will be side-effects, like process_winit_event
  2. Add documentation for these methods.
  3. Change the returned bool to a more meaningful enum, either a Result or a custom ShouldFilter enum to better communicate intended use.