Verified Commit e8b0a407 authored by Alex Pott's avatar Alex Pott
Browse files

fix: #3611423 FieldStorageReuseForm aria-label "Reuse" vs visible "Re-use"

By: mgifford
By: tiago
By: nisha_j
(cherry picked from commit eef285cd)
parent 15cb2ff8
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for core/modules/field_ui/src/Form/FieldStorageReuseForm.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $entity_t
              'button--small',
              'use-ajax',
            ],
            'aria-label' => $this->t('Reuse @field_name', ['@field_name' => $field['field_name']]),
            'aria-label' => $this->t('Re-use @field_name', ['@field_name' => $field['field_name']]),
            'data-dialog-type' => 'modal',
          ],
          '#submit' => [
+2
Changes for core/modules/field_ui/tests/src/Traits/FieldUiTestTrait.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -130,6 +130,8 @@ public function fieldUIAddExistingField($bundle_path, $existing_storage_name, $l
    $this->assertSession()->linkExists('Re-use an existing field');
    $this->clickLink('Re-use an existing field');
    $this->assertSession()->elementExists('css', "input[value=Re-use][name=$existing_storage_name]");
    // The accessible name starts with the visible label.
    $this->assertSession()->elementAttributeContains('css', "input[value=Re-use][name=$existing_storage_name]", 'aria-label', "Re-use $existing_storage_name");
    $this->click("input[value=Re-use][name=$existing_storage_name]");

    // Set the main content to only the content region because the label can