fix yes/no radio input (#955)

This commit is contained in:
LawyZheng
2024-10-11 10:48:41 +08:00
committed by GitHub
parent 555836ee41
commit 3a935584d0
2 changed files with 11 additions and 1 deletions

View File

@@ -573,7 +573,7 @@ def _trimmed_attributes(attributes: dict) -> dict:
for key in attributes:
if key == "role" and attributes[key] in ["listbox", "option"]:
new_attributes[key] = attributes[key]
if key in RESERVED_ATTRIBUTES and attributes[key]:
if key in RESERVED_ATTRIBUTES:
new_attributes[key] = attributes[key]
return new_attributes