Open zcorpan opened 5 months ago
We still want to discourage its use, because there are accessibility issues with keypress
that input
has fixed. For example, speech input devices should create an input
event rather have to create a sequence of keypress
events appropriate for the current layout/locale. Sites that rely only on keypress
would work fine for many people, but would effectively block (or require odd hacks for) users with non-standard input devices. This is why we wanted a stronger deprecation message for this event.
I don't think "legacy" is a strong enough phrasing for this since it implies that it's OK to use, but it might go away at some point. I think our position is closer to: "it's somewhat harmful to rely on this event, but we can't remove it".
Web content and user agents are different conformance classes, so you can have independent requirements for each.
keypress
eventkeypress
eventYou can also use "obsolete" instead of "legacy", and explain some of the issues to further discourage usage.
https://w3c.github.io/uievents/#keypress
I think it's not great that support for the legacy
keypress
event is optional. It adds complexity to the specification to need to handle the chain of default actions (see #361) differently depending on whetherkeypress
is supported or not, and iftextInput
(#353) is also supposed to be optional it becomes more complex still.This complexity leaks to tests, or tests would need to be marked as "optional" if they test legacy events.
What is the benefit? As long as the events are needed for web compat, I think the spec should require support, even if it's marked as "legacy".
cc @masayuki-nakano