Skip to content

Commit

Permalink
VACMS-19377: Added code back in to patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
anantais committed Nov 14, 2024
1 parent e6ad25a commit 0fea195
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,4 +484,28 @@ index a714c6e..36cff2f 100644
if (window.matchMedia("(max-width: 767px)").matches && $('body').hasClass('toolbar-tray-open')) {
$('body').removeClass('toolbar-tray-open');
$('#toolbar-item-administration').removeClass('is-active');
diff --git a/src/Form/AdminToolbarSettingsForm.php b/src/Form/AdminToolbarSettingsForm.php
index 575f5e6..a0f0eda 100644
--- a/src/Form/AdminToolbarSettingsForm.php
+++ b/src/Form/AdminToolbarSettingsForm.php
@@ -67,6 +67,12 @@ class AdminToolbarSettingsForm extends ConfigFormBase {
'#options' => array_combine($depth_values, $depth_values),
];

+ $form['remove_keyboard_accessibility'] = [
+ '#type' => 'checkbox',
+ '#description' => $this->t('Hide top-level keyboard navigation arrows on desktop.'),
+ '#default_value' => $config->get('remove_keyboard_accessibility'),
+ ];
+
return parent::buildForm($form, $form_state);
}

@@ -76,6 +82,7 @@ class AdminToolbarSettingsForm extends ConfigFormBase {
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->config('admin_toolbar.settings')
->set('menu_depth', $form_state->getValue('menu_depth'))
+ ->set('remove_keyboard_accessibility', $form_state->getValue('remove_keyboard_accessibility'))
->save();
parent::submitForm($form, $form_state);
$this->cacheMenu->invalidateAll();

0 comments on commit 0fea195

Please sign in to comment.