Skip to content

Commit ed19983

Browse files
committed
theme: undo fix (theme) : add aria label to the categories list tags
1 parent fe563ae commit ed19983

3 files changed

Lines changed: 3 additions & 14 deletions

File tree

wp-dsfr-theme/components/loops/fr-card.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,7 @@
6161
?>
6262
<div class="fr-card__start">
6363
<?php
64-
get_template_part(
65-
'components/parts/common/tags-group',
66-
'',
67-
[
68-
'list_label' => __( 'Catégorisé dans', 'wp-dsfr-theme' ),
69-
'tags' => $card_tags,
70-
]
71-
);
64+
get_template_part( 'components/parts/common/tags-group', '', [ 'tags' => $card_tags ] );
7265
get_template_part( 'components/parts/common/badges-group', '', [ 'badges' => $card_start_badges ] );
7366
?>
7467
</div>

wp-dsfr-theme/components/parts/common/tags-group.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* ],
1717
* ...
1818
* ]
19-
* 'list_label' => '',
2019
* ]
2120
*
2221
*/
@@ -26,10 +25,8 @@
2625
if ( empty( $args['tags'] ) ) {
2726
return;
2827
}
29-
30-
$list_label = ! empty( $args['list_label'] ) ? $args['list_label'] : __( 'Liste des catégories', 'wp-dsfr-theme' );
3128
?>
32-
<ul class="fr-tags-group" aria-label="<?php echo esc_attr( $list_label ); ?>">
29+
<ul class="fr-tags-group">
3330
<?php
3431
foreach ( $args['tags'] as $fr_tag ) :
3532
$tag_classes = [ 'fr-tag' ];

wp-dsfr-theme/components/parts/single/hero-single.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
'components/parts/common/tags-group',
1515
'',
1616
[
17-
'list_label' => __( 'Catégorisé dans', 'wp-dsfr-theme' ),
18-
'tags' => get_tags_group_arg( get_the_terms_array( get_the_ID(), 'category' ) ),
17+
'tags' => get_tags_group_arg( get_the_terms_array( get_the_ID(), 'category' ) ),
1918
]
2019
);
2120

0 commit comments

Comments
 (0)