diff --git a/src/AriaAttributesBuilder.php b/src/AriaAttributesBuilder.php index f31c4c0..109c986 100644 --- a/src/AriaAttributesBuilder.php +++ b/src/AriaAttributesBuilder.php @@ -21,6 +21,9 @@ public function build( $data ): array { $attribs = []; foreach ( $data as $key => $value ) { + if ( $value === '' ) { + continue; + } $attrib = Sanitizer::safeEncodeTagAttributes( [ "aria-$key" => $value ] );