Steps to reproduce after installing/enabling context:
1. add a menu block to any region in context
2. on the front-end confirm that these attributes are broken: aria-labelledby attribute on block div and the id attribute on the block title are '-menu'

Comments

vector_ray created an issue. See original summary.

paulocs’s picture

Hello @vector_ray,

Could you be more specific how to reproduce the issue?

Steps I did to try to reproduce:

1) Installed Context 8.x-4.x-dev
2) Created a new context in structure->context->add new context
3) In my context I used as Conditions a node bundle for articles and in Reactions I placed a main navigation in the Header

My attributes are not broken.

Thanks :)

vector_ray’s picture

1) Install fresh copy of drupal 8.9.1
2) Set Bartik as the default theme
1) Installed Context 8.x-4.x-dev
2) Created a new context in structure->context->add new context
3) In context set no condition and do not check 'Include blocks from Block layout' I placed the core main navigation in the Header.

Now this is all I see when visiting the homepage
screenshot of homepage

When viewing the source code on the main navigation block I see that the aria-labelledby attribute on block div and the id attribute on the block title are '-menu'
source code

In the twig template in stable, classy and bartik: block--system-menu-block.html.twig
is printing out a variable attributes.id which is missing. If I place the menu block using the block layout system that variable is printing correctly.

I hope this is enough to go on.

thalles’s picture

StatusFileSize
new122.96 KB
new110.08 KB

In my enviroment this don't reproduce, see:
my contex settings:

The output:

thalles’s picture

I am using Drupal 8.9.1 and dev branch

paulocs’s picture

@vector_ray, please try git pull in the 8.x-4.x-dev branch and see if it is happening.

Thanks @thalles!

vector_ray’s picture

Status: Active » Fixed

Steps I've taken:
1. Pulled the latest 8.x-4.x-dev version via composer
2. ran drush updb
The following updates are pending:

context module :
8003 - Add default "custom_id" property to all blocks reactions.

Do you wish to run all pending updates? (y/n): y
Performing context_update_8003

3. Ran the pending change
4. tested and confirmed that this is fixed in the latest dev version.

Thanks for your help guys. Any idea when we can expect this in a stable release? I have some projects whose security requirements do not allow dev releases or patches in their codebase.

paulocs’s picture

We are working on a next release. See issue #3156120: Plan for a new release
We will release a new version soon!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.