This seems to work:
attrs = (class = "1", style = "test", required = 1, var"custom-attr" = "ok")
This uses the @var_str string macro to create a Symbol that would otherwise not be valid.
Update:
I just learned that @var_str doesn’t really exist. The var"" syntax looks like a string macro, but it is actually implemented directly by the parser, according to the doc string.