LibWeb: Implement <input type=checkbox switch> experimentally

In conformance with the requirements of the spec PR at
https://github.com/whatwg/html/pull/9546, this change adds support for
the “switch” attribute for type=checkbox “input” elements — which is
shipping in Safari (since Safari 17.4). This change also implements
support for exposing it to AT users with role=switch.
This commit is contained in:
sideshowbarker 2024-12-11 11:34:41 +09:00 committed by Sam Atkins
commit 583ca6af89
Notes: github-actions[bot] 2024-12-13 11:32:27 +00:00
16 changed files with 268 additions and 3 deletions

View file

@ -288,7 +288,7 @@ CppType idl_type_name_to_cpp_type(Type const& type, Interface const& interface)
static ByteString make_input_acceptable_cpp(ByteString const& input)
{
if (input.is_one_of("class", "template", "for", "default", "char", "namespace", "delete", "inline", "register")) {
if (input.is_one_of("class", "template", "for", "default", "char", "namespace", "delete", "inline", "register", "switch")) {
StringBuilder builder;
builder.append(input);
builder.append('_');