diff --git a/crates/cheers/src/validation/elements.rs b/crates/cheers/src/validation/elements.rs
index f1dc3a1..e6fb482 100644
--- a/crates/cheers/src/validation/elements.rs
+++ b/crates/cheers/src/validation/elements.rs
@@ -550,6 +550,12 @@ define_validation_elements! {
/// A button labeled by its contents.
button {
+ /// Action to perform on the element targeted by `commandfor`
+ command
+
+ /// ID of the element controlled by the button
+ commandfor
+
/// Whether the form control is disabled
disabled
diff --git a/crates/cheers/tests/main.rs b/crates/cheers/tests/main.rs
index acc68c4..9caeb63 100644
--- a/crates/cheers/tests/main.rs
+++ b/crates/cheers/tests/main.rs
@@ -876,6 +876,20 @@ fn aria_multiple_attributes() {
);
}
+#[test]
+fn button_command_attributes() {
+ let result = html! {
+ button command="show-modal" commandfor="dialog" { "Open" }
+ dialog id="dialog" {}
+ }
+ .render();
+
+ assert_eq!(
+ result.as_inner(),
+ r#""#
+ );
+}
+
#[test]
#[cfg(feature = "mathml")]
fn mathml() {