Skip to content

Commit

Permalink
Allow empty aria label (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
DvogelHallowelt authored Oct 18, 2024
1 parent d16ae4e commit c920efc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/AriaAttributesBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public function build( $data ): array {
$attribs = [];

foreach ( $data as $key => $value ) {
if ( $value === '' ) {
continue;
}
$attrib = Sanitizer::safeEncodeTagAttributes( [
"aria-$key" => $value
] );
Expand Down

0 comments on commit c920efc

Please sign in to comment.