Skip to content
Snippets Groups Projects

Issue #3503878: TypeError when having exposed form in block and setting "role" attribute on it

Open Issue #3503878: TypeError when having exposed form in block and setting "role" attribute on it
3 unresolved threads
Open Riyas N R requested to merge issue/drupal-3503878:3503878-typeerror-when-having into 11.x
3 unresolved threads

Closes #3503878

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Riyas N R added 1 commit

    added 1 commit

    • e9e822a9 - Issue #3503878: Add test case in block module and move view test to search integration test file

    Compare with previous version

  • Riyas N R added 1 commit

    added 1 commit

    Compare with previous version

  • Riyas N R added 1 commit

    added 1 commit

    Compare with previous version

  • catch @catch started a thread on the diff
  • 98 99 }
    99 100 }
    100 101
    102 /**
    103 * Implements hook_form_alter().
    104 */
    105 #[Hook('form_alter')]
    106 public function formAlter(&$form, FormStateInterface $form_state, $form_id): void {
    107 if (\Drupal::state()->get('views_test_config_form_alter')) {
  • catch @catch started a thread on the diff
  • 141 141
    142 142 // Proactively add aria-describedby if possible to improve accessibility.
    143 143 if ($variables['label'] && isset($variables['attributes']['role'])) {
    144 $variables['title_attributes']['id'] = Html::getUniqueId($variables['label']);
    144 $label = $variables['label'];
    145 // If the label is an array, render it to a string.
    146 if (is_array($label)) {
    • I don't really understand why label would be an array here, could this explain the circumstances under which that happens, and is there explicit test coverage? If there is it's not clear to me where it is in the two changed tests here.

    • Please register or sign in to reply
    Please register or sign in to reply
    Loading