Skip to content

Commit

Permalink
Adjust conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Dec 5, 2023
1 parent 696234b commit 21e9eec
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions themes/stanford_basic/stanford_basic.theme
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* Preprocess functions for Stanford Basic.
*/

use Drupal\Core\Render\Element;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage;
use Drupal\Component\Utility\Html;
use Drupal\Core\Block\BlockPluginInterface;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Render\Element;
use Drupal\Core\Url;
use Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage;

/**
* Implements hook_library_info_alter().
Expand Down Expand Up @@ -227,7 +228,10 @@ function stanford_basic_preprocess_block(&$variables) {
}
}

if (!isset($variables['configuration']['label_display'])) {
if (
!isset($variables['configuration']['label_display']) ||
$variables['configuration']['label_display'] != BlockPluginInterface::BLOCK_LABEL_VISIBLE
) {
$variables['title_attributes']['aria-hidden'] = 'true';
}
}
Expand Down

0 comments on commit 21e9eec

Please sign in to comment.