From cd7c90e6b783e3c3cdf68f6067237327d2fb470d Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Sun, 8 Dec 2024 07:26:00 -0800 Subject: [PATCH 1/2] Field toggle accessibility --- src/fields/Link.php | 2 +- .../fieldtypes/elementfieldsettings.twig | 2 +- .../widgets/CraftSupport/body.twig | 2 +- src/web/assets/cp/dist/cp.js | 2 +- src/web/assets/cp/dist/cp.js.map | 2 +- src/web/assets/cp/dist/css/cp.css | 2 +- src/web/assets/cp/dist/css/cp.css.map | 2 +- src/web/assets/cp/src/css/_main.scss | 8 +++ src/web/assets/cp/src/js/FieldToggle.js | 56 +++++++++++++++---- .../craftsupport/dist/CraftSupportWidget.js | 2 +- .../dist/CraftSupportWidget.js.map | 2 +- .../craftsupport/src/CraftSupportWidget.js | 13 +++-- 12 files changed, 72 insertions(+), 23 deletions(-) diff --git a/src/fields/Link.php b/src/fields/Link.php index 3b00c1676d3..9459e300d2f 100644 --- a/src/fields/Link.php +++ b/src/fields/Link.php @@ -393,7 +393,7 @@ public function getSettingsHtml(): ?string 'on' => $this->showTargetField, ]) . Html::tag('hr') . - Html::a(Craft::t('app', 'Advanced'), options: [ + Html::button(Craft::t('app', 'Advanced'), options: [ 'class' => 'fieldtoggle', 'data' => ['target' => 'advanced'], ]) . diff --git a/src/templates/_components/fieldtypes/elementfieldsettings.twig b/src/templates/_components/fieldtypes/elementfieldsettings.twig index 456e61b6612..a6a7c6e802b 100644 --- a/src/templates/_components/fieldtypes/elementfieldsettings.twig +++ b/src/templates/_components/fieldtypes/elementfieldsettings.twig @@ -134,7 +134,7 @@ {% block advancedSettings %}
- {{ "Advanced"|t('app') }} +