From e4ec8dd0b73b1dfb43eea06bdd96a95ade341b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Andrietti?= Date: Mon, 20 Apr 2026 14:37:39 +0200 Subject: [PATCH] Update share link attributes for accessibility --- inc/Helpers/Formatting/Share.php | 26 +-- languages/beapi-frontend-framework.pot | 176 +++++++++++++------- languages/fr_FR.mo | Bin 2918 -> 2470 bytes languages/fr_FR.po | 217 +++++++++++++++++-------- 4 files changed, 274 insertions(+), 145 deletions(-) diff --git a/inc/Helpers/Formatting/Share.php b/inc/Helpers/Formatting/Share.php index c64aa922..c6973982 100644 --- a/inc/Helpers/Formatting/Share.php +++ b/inc/Helpers/Formatting/Share.php @@ -49,8 +49,8 @@ function get_share_link( string $name, string $link_to_share, array $share_attri $networks = [ 'facebook' => [ - 'attributes' => [ - 'title' => __( 'Share on Facebook', 'beapi-frontend-framework' ), + 'accessible_name' => __( 'Share on Facebook', 'beapi-frontend-framework' ), + 'attributes' => [ 'href' => 'http://www.facebook.com/sharer.php', 'class' => 'share__link', ], @@ -60,8 +60,8 @@ function get_share_link( string $name, string $link_to_share, array $share_attri ], ], 'x' => [ - 'attributes' => [ - 'title' => __( 'Share on X', 'beapi-frontend-framework' ), + 'accessible_name' => __( 'Share on X', 'beapi-frontend-framework' ), + 'attributes' => [ 'href' => 'https://twitter.com/intent/tweet', 'class' => 'share__link', ], @@ -71,8 +71,8 @@ function get_share_link( string $name, string $link_to_share, array $share_attri ], ], 'linkedin' => [ - 'attributes' => [ - 'title' => __( 'Share on Linkedin', 'beapi-frontend-framework' ), + 'accessible_name' => __( 'Share on Linkedin', 'beapi-frontend-framework' ), + 'attributes' => [ 'href' => 'https://www.linkedin.com/shareArticle', 'class' => 'share__link', ], @@ -82,8 +82,8 @@ function get_share_link( string $name, string $link_to_share, array $share_attri ], ], 'instagram' => [ - 'attributes' => [ - 'title' => __( 'Share on Instagram', 'beapi-frontend-framework' ), + 'accessible_name' => __( 'Share on Instagram', 'beapi-frontend-framework' ), + 'attributes' => [ 'href' => 'https://www.instagram.com/', 'class' => 'share__link', ], @@ -93,8 +93,8 @@ function get_share_link( string $name, string $link_to_share, array $share_attri ], ], 'bluesky' => [ - 'attributes' => [ - 'title' => __( 'Share on Bluesky', 'beapi-frontend-framework' ), + 'accessible_name' => __( 'Share on Bluesky', 'beapi-frontend-framework' ), + 'attributes' => [ 'href' => 'https://bsky.app/intent/compose', 'class' => 'share__link', ], @@ -104,8 +104,8 @@ function get_share_link( string $name, string $link_to_share, array $share_attri ], ], 'email' => [ - 'attributes' => [ - 'title' => __( 'Share on Email', 'beapi-frontend-framework' ), + 'accessible_name' => __( 'Share by email', 'beapi-frontend-framework' ), + 'attributes' => [ 'href' => 'mailto:', 'class' => 'share__link', ], @@ -146,7 +146,7 @@ function get_share_link( string $name, string $link_to_share, array $share_attri 'content' => sprintf( '%s%s', $icon_html, - $network['attributes']['title'] + (string) ( $network['accessible_name'] ?? '' ) ), 'mode' => 'button', 'before' => '
  • ', diff --git a/languages/beapi-frontend-framework.pot b/languages/beapi-frontend-framework.pot index 6e0c74ab..05d85d8e 100644 --- a/languages/beapi-frontend-framework.pot +++ b/languages/beapi-frontend-framework.pot @@ -1,5 +1,5 @@ -# Copyright (C) 2025 BeAPI -# This file is distributed under the . +# Copyright (C) 2026 BeAPI +# This file is distributed under the same license as the Be API Frontend Framework theme. msgid "" msgstr "" "Project-Id-Version: Be API Frontend Framework 1.0.0\n" @@ -9,9 +9,9 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2025-02-18T15:06:50+00:00\n" +"POT-Creation-Date: 2026-04-20T12:32:17+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.10.0\n" +"X-Generator: WP-CLI 2.12.0\n" "X-Domain: beapi-frontend-framework\n" #. Theme Name of the theme @@ -43,39 +43,40 @@ msgstr "" msgid "Footer" msgstr "" -#: header.php:33 +#: header.php:28 msgid "Fast access links" msgstr "" -#: header.php:36 +#: header.php:31 +#: header.php:34 msgid "Go to main navigation menu" msgstr "" -#: header.php:39 +#: header.php:37 msgid "Go to main content" msgstr "" -#: header.php:42 +#: header.php:40 msgid "Go to footer" msgstr "" -#: header.php:46 +#: header.php:44 msgid "Header" msgstr "" -#: header.php:56 +#: header.php:54 msgid "Open the menu" msgstr "" -#: header.php:57 +#: header.php:55 msgid "Close the menu" msgstr "" -#: header.php:60 +#: header.php:58 msgid "Main navigation" msgstr "" -#: header.php:79 +#: header.php:77 msgid "Main content" msgstr "" @@ -91,98 +92,67 @@ msgstr "" msgid "New window" msgstr "" -#: inc/Helpers/Formatting/Share.php:53 +#: inc/Helpers/Formatting/Share.php:52 msgid "Share on Facebook" msgstr "" -#: inc/Helpers/Formatting/Share.php:64 +#: inc/Helpers/Formatting/Share.php:63 msgid "Share on X" msgstr "" -#: inc/Helpers/Formatting/Share.php:75 +#: inc/Helpers/Formatting/Share.php:74 msgid "Share on Linkedin" msgstr "" -#: inc/Helpers/Formatting/Share.php:86 +#: inc/Helpers/Formatting/Share.php:85 msgid "Share on Instagram" msgstr "" -#: inc/Helpers/Formatting/Share.php:97 +#: inc/Helpers/Formatting/Share.php:96 msgid "Share on Bluesky" msgstr "" -#: inc/Helpers/Formatting/Share.php:108 -msgid "Share on Email" +#: inc/Helpers/Formatting/Share.php:107 +msgid "Share by email" msgstr "" -#: inc/Services/Editor.php:81 -msgid "Dark" -msgstr "" - -#: inc/Services/Editor.php:86 -msgid "Light" -msgstr "" - -#: inc/Services/Editor.php:91 -msgid "Primary" -msgstr "" - -#: inc/Services/Editor.php:96 -msgid "Secondary" -msgstr "" - -#: inc/Services/Editor.php:107 -msgid "Title 6" -msgstr "" - -#: inc/Services/Editor.php:113 -msgid "Title 5" -msgstr "" - -#: inc/Services/Editor.php:119 -msgid "Title 4" -msgstr "" - -#: inc/Services/Editor.php:125 -msgid "Title 3" -msgstr "" - -#: inc/Services/Editor.php:131 -msgid "Title 2" -msgstr "" - -#: inc/Services/Editor.php:137 -msgid "Title 1" -msgstr "" - -#: inc/Services/Editor.php:251 +#: inc/Services/Editor.php:144 msgid "Small" msgstr "" -#: inc/Services/Editor.php:259 +#: inc/Services/Editor.php:152 msgid "Large" msgstr "" -#: inc/Services/Editor.php:267 +#: inc/Services/Editor.php:160 msgid "Huge" msgstr "" +#. translators: %s: heading number +#: inc/Services/Editor.php:168 +#, php-format +msgid "Style H%s" +msgstr "" + #: inc/Services/Editor_Patterns.php:40 msgid "Common" msgstr "" #. translators: %s: file name. #: inc/Services/Editor_Patterns.php:125 +#, php-format msgid "Could not register file \"%s\" as a block pattern (\"Slug\" field missing)" msgstr "" #. translators: %1s: file name; %2s: slug value found. #: inc/Services/Editor_Patterns.php:138 +#, php-format msgid "Could not register file \"%1$s\" as a block pattern (invalid slug \"%2$s\")" msgstr "" #. translators: %1s: file name; %2s: slug value found. #: inc/Services/Editor_Patterns.php:155 +#, php-format msgid "Could not register file \"%s\" as a block pattern (\"Title\" field missing)" msgstr "" @@ -198,3 +168,83 @@ msgstr "" msgctxt "Pattern title" msgid "Media Text" msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Noir" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Blanc" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Jaune 500" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 100" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 200" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 300" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 400" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 500" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 600" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 700" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 800" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 900" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "xs (16px)" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "sm (32px)" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "md (48px)" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "lg (64px)" +msgstr "" diff --git a/languages/fr_FR.mo b/languages/fr_FR.mo index fbeaed9eefb48953de1ab421074ac2ef070e8633..8a008186f85b95bac7761b4023306428d06972bd 100644 GIT binary patch delta 801 zcmXZaF-%iI9LMp0q3xp;kV2_qk-mi{L`Z7e5H(RJWfBJ&T#FDP0VQ=J3>^sr0duKw zutpXmF-8q046qmzT!at@69*VOP>Jm0A|BuzmOZn1Y~UI6I$DY6P#ce8KVCx}cnXKv z-yYIoj@3~mYM>I?MooN+O5h`Ef#dLfGkpIy)FUfZCWAU*9@BUkHE$9#I1`Rnu%?9{ z)6s@6kb~P0O`)=@GFnWbGV)2ViT*EKd2nT#t5C9v^DTnS!ftS4C8OY`g9CA0#h_HW zFU0^&m7wy*p@M4kp+YCf(gt_x?Ow!fMXPQgcCY)+T%|hePcQqkiF|9KiA4>bmZl+UAyKe{}ofmV~)uDN8|wWfFD>v@X$Ma;F^KKQL-w2wu8$ zDQJia5-B1&q#gDW9U_Q42_39c(4`bQB@`WkqVI3_3GJcBy!pKO&Fq`s`_0=YvDLONAXz&C)&MAks7>je2n#6KgSTh!hU>X3)<;%`Y!rzdJFx3Ey@jkF3oh^=)6)| z_4{vUpjnv>e{G(#=7ZXPZ7dP|srmR8HXpRTLam1`AZbgj<6jXy`RY4vo0x-r@3 zvQsnBwx>k#JL_;Sy{#}`Q5^`Lw7oIEP&r<8#=SB!;kO0T)>+TZ+TN55I>Y%~x;PrK zJtv;e#d|Z8&iEL&)&qT6+s*h-gQq)(+=+}6x1?m3@sRPbvD?_=uLWnL-5trU4l5P6 zdX6Mh2a=XQTeVba9kdFgq1ixaFrU5TIesX7H}>X6F7IU>>G$khT25qa*Yg*`Qw^G_ z>pAPGGW1iCR=+dS 1);\n" -"X-Generator: Poedit 3.1.1\n" +"X-Generator: Poedit 3.8\n" "X-Domain: beapi-frontend-framework\n" #. Theme Name of the theme @@ -46,39 +46,39 @@ msgstr "Fil d’ariane" msgid "Footer" msgstr "Pied de Page" -#: header.php:33 +#: header.php:28 msgid "Fast access links" msgstr "Liens d’accès rapide" -#: header.php:36 +#: header.php:31 header.php:34 msgid "Go to main navigation menu" msgstr "Aller au menu de navigation principal" -#: header.php:39 +#: header.php:37 msgid "Go to main content" msgstr "Aller au contenu principal" -#: header.php:42 +#: header.php:40 msgid "Go to footer" msgstr "Aller au pied de page" -#: header.php:46 +#: header.php:44 msgid "Header" msgstr "Entête" -#: header.php:56 +#: header.php:54 msgid "Open the menu" msgstr "Ouvrir le menu" -#: header.php:57 +#: header.php:55 msgid "Close the menu" msgstr "Fermer le menu" -#: header.php:60 +#: header.php:58 msgid "Main navigation" msgstr "Navigation principale" -#: header.php:79 +#: header.php:77 msgid "Main content" msgstr "Contenu principal" @@ -94,81 +94,47 @@ msgstr "Fermer le menu" msgid "New window" msgstr "Nouvelle fenêtre" -#: inc/Helpers/Formatting/Share.php:53 +#: inc/Helpers/Formatting/Share.php:52 msgid "Share on Facebook" msgstr "Partager sur Facebook" -#: inc/Helpers/Formatting/Share.php:64 +#: inc/Helpers/Formatting/Share.php:63 msgid "Share on X" msgstr "Partager sur X" -#: inc/Helpers/Formatting/Share.php:75 +#: inc/Helpers/Formatting/Share.php:74 msgid "Share on Linkedin" msgstr "Partager sur Linkedin" -#: inc/Helpers/Formatting/Share.php:86 +#: inc/Helpers/Formatting/Share.php:85 msgid "Share on Instagram" msgstr "Partager sur Instagram" -#: inc/Helpers/Formatting/Share.php:97 +#: inc/Helpers/Formatting/Share.php:96 msgid "Share on Bluesky" msgstr "Partager sur Bluesky" -#: inc/Helpers/Formatting/Share.php:108 -msgid "Share on Email" +#: inc/Helpers/Formatting/Share.php:107 +msgid "Share by email" msgstr "Partager par email" -#: inc/Services/Editor.php:81 -msgid "Dark" -msgstr "Sombre" - -#: inc/Services/Editor.php:86 -msgid "Light" -msgstr "Clair" - -#: inc/Services/Editor.php:91 -msgid "Primary" -msgstr "Primaire" - -#: inc/Services/Editor.php:96 -msgid "Secondary" -msgstr "Secondaire" - -#: inc/Services/Editor.php:107 -msgid "Title 6" -msgstr "Titre de niveau 6" - -#: inc/Services/Editor.php:113 -msgid "Title 5" -msgstr "Titre de niveau 5" - -#: inc/Services/Editor.php:119 -msgid "Title 4" -msgstr "Titre de niveau 4" - -#: inc/Services/Editor.php:125 -msgid "Title 3" -msgstr "Titre de niveau 3" - -#: inc/Services/Editor.php:131 -msgid "Title 2" -msgstr "Titre de niveau 2" - -#: inc/Services/Editor.php:137 -msgid "Title 1" -msgstr "Titre de niveau 1" - -#: inc/Services/Editor.php:251 +#: inc/Services/Editor.php:144 msgid "Small" msgstr "Petit" -#: inc/Services/Editor.php:259 +#: inc/Services/Editor.php:152 msgid "Large" msgstr "Grand" -#: inc/Services/Editor.php:267 +#: inc/Services/Editor.php:160 msgid "Huge" -msgstr "Énorme" +msgstr "Très grand" + +#. translators: %s: heading number +#: inc/Services/Editor.php:168 +#, php-format +msgid "Style H%s" +msgstr "" #: inc/Services/Editor_Patterns.php:40 msgid "Common" @@ -176,27 +142,30 @@ msgstr "Général" #. translators: %s: file name. #: inc/Services/Editor_Patterns.php:125 +#, php-format msgid "" "Could not register file \"%s\" as a block pattern (\"Slug\" field missing)" msgstr "" -"Impossible de déclarer la composition de blocs à partir du fichier \"%s" -"\" (Le champ \"Slug\" est manquant)" +"Impossible de déclarer la composition de blocs à partir du fichier \"%s\" " +"(Le champ \"Slug\" est manquant)" #. translators: %1s: file name; %2s: slug value found. #: inc/Services/Editor_Patterns.php:138 +#, php-format msgid "" "Could not register file \"%1$s\" as a block pattern (invalid slug \"%2$s\")" msgstr "" -"Impossible de déclarer la composition de blocs à partir du fichier \"%1$s" -"\" (Le slug \"%2$s\" n'est pas valide)" +"Impossible de déclarer la composition de blocs à partir du fichier \"%1$s\" " +"(Le slug \"%2$s\" n'est pas valide)" #. translators: %1s: file name; %2s: slug value found. #: inc/Services/Editor_Patterns.php:155 +#, php-format msgid "" "Could not register file \"%s\" as a block pattern (\"Title\" field missing)" msgstr "" -"Impossible de déclarer la composition de blocs à partir du fichier \"%s" -"\" (Le champ \"Title\" est manquant)" +"Impossible de déclarer la composition de blocs à partir du fichier \"%s\" " +"(Le champ \"Title\" est manquant)" #: inc/Services/Menu.php:37 msgid "Main menu" @@ -211,5 +180,115 @@ msgctxt "Pattern title" msgid "Media Text" msgstr "Média et texte" +#: theme.json +msgctxt "Color name" +msgid "Noir" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Blanc" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Jaune 500" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 100" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 200" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 300" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 400" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 500" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 600" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 700" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 800" +msgstr "" + +#: theme.json +msgctxt "Color name" +msgid "Gris 900" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "xs (16px)" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "sm (32px)" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "md (48px)" +msgstr "" + +#: theme.json +msgctxt "Space size name" +msgid "lg (64px)" +msgstr "" + +#~ msgid "Dark" +#~ msgstr "Sombre" + +#~ msgid "Light" +#~ msgstr "Clair" + +#~ msgid "Primary" +#~ msgstr "Primaire" + +#~ msgid "Secondary" +#~ msgstr "Secondaire" + +#~ msgid "Title 6" +#~ msgstr "Titre de niveau 6" + +#~ msgid "Title 5" +#~ msgstr "Titre de niveau 5" + +#~ msgid "Title 4" +#~ msgstr "Titre de niveau 4" + +#~ msgid "Title 3" +#~ msgstr "Titre de niveau 3" + +#~ msgid "Title 2" +#~ msgstr "Titre de niveau 2" + +#~ msgid "Title 1" +#~ msgstr "Titre de niveau 1" + #~ msgid "Toggle menu" #~ msgstr "Ouvrir/Fermer le menu"