Comments

mherchel created an issue. See original summary.

aaronmchale’s picture

I mentioned during #3208186: Drupal Usability Meeting 2021-04-23 while we discussed the implementation in #3190120: Olivero: Focused level-2 nav items should always be in viewport during keyboard navigation. that I thought there was a way to essentially stop the browser from scrolling when the menu is open.

The method I have used to accomplish this in the past is, by applying overflow: hidden to the html tag when the menu is open, this temporarily removes the browsers scroll bars and so freezes the position of the browser. This might be possible using CSS selectors, I couldn't find the exact code I had used in the past.

The result of this would be that when the user has the menu open, if they scroll to the bottom of the menu, their browser would not continue to scroll the page and so they would not inadvertently close the menu.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mherchel’s picture

Priority: Normal » Minor
mherchel’s picture

Status: Active » Needs review
Issue tags: +JavaScript, +Needs tests
StatusFileSize
new1.61 KB

This solves the issue. Needs tests though.

gauravvvv’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new5.01 MB

This is fixed, Tested patch #5, If the menu item has focus then header is not collapsing.

Added after patch screen recording.

Moving to RTBC

gauravvvv’s picture

Status: Reviewed & tested by the community » Needs work

If we scroll the window while menu item has focus then header is not closing, which is perfect as per issue. but if try this once then move focus to page title or any other component/element of the page and we scroll then header is not closing itself. it's an issue. this should be fixed.

Moving to NW.

kiran.kadam911’s picture

Status: Needs work » Needs review
StatusFileSize
new9.45 MB
new1.73 KB
new1.03 KB

Thanks @mherchel for the patch. Providing updated patch to resolve issue mentioned in #7 by @Gauravmahlawat

A screencast is attached for reference. Kindly review the attached patch.

Thanks!

xjm’s picture

Priority: Minor » Normal

As an accessibility issue, this is at least normal and possibly major.

chetanbharambe’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new3.84 MB
new6.77 MB

Verified and tested patch #8.
Patch applied successfully and looks good to me.

Testing Steps:
# Goto: Appearance:- Set Olivero theme
# Create sub-menu under any main navigation menu
# Tab into the primary menu and open a submenu
# Scroll down the page.
# Note that the header menu will collapse.

Expected Results:
# Header menu should not collapse when the user evaluating accessibility while pressing the tab key.

Actual Results:
# Header menu is collapsing when the user evaluating accessibility while pressing the tab key.

Please refer attached videos.
Looks good to me.
Can be a move to RTBC.

mherchel’s picture

Status: Reviewed & tested by the community » Needs work

Looks like the tests aren't passing.

sagarchauhan’s picture

Status: Needs work » Needs review
StatusFileSize
new1.1 KB
new1.1 KB
new6.2 MB

Fixed the patch for failing test and retaining the behaviour of header being still visible in case there is focus on any of its children. Added a screenshot to show the behaviour after the patch.

sagarchauhan’s picture

StatusFileSize
new1.62 KB
new1.1 KB

Added a wrong patch. Updating with the right patch and interdiff. The comment and the screencast is same as #12.

Status: Needs review » Needs work

The last submitted patch, 13: 3210434-13.patch, failed testing. View results

sagarchauhan’s picture

Status: Needs work » Needs review
heni_deepak’s picture

StatusFileSize
new6.83 MB

#13 Patch applied. Please check the report video.
Report
1. patch has a fixed menu if focuses on the submenu.
2. Menu forgot his basic behavior after testing 1 point.
3. When I click on the left side menu toggle button. the basic behavior comes back.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

pradipmodh13’s picture

In Drupal 10.1.x Header menu is not closing if menu item has focus. It is working fine as expected.
We can move this bug to RTBC.

andy-blum’s picture

Status: Needs review » Needs work

The recording in #20 is deceptive. While that's the behavior we're aiming for, we need it to occur automatically. If a user hasn't already scrolled down and opened the header, this behavior does not occur. Patch #13 is pretty out-dated at this point and will need a reroll.

_utsavsharma’s picture

Status: Needs work » Needs review
StatusFileSize
new761 bytes
new761 bytes

Tried to re-roll for 10.1.x.
Please review.

Bushra Shaikh’s picture

I have applied patch #22 on drupal 10.1.x version. Patch failed.

Checking patch core/themes/olivero/js/navigation-utils.js...
error: while searching for:
      entries.forEach((entry) => {
        // Firefox doesn't seem to support entry.isIntersecting properly,
        // so we check the intersectionRatio.
        fixableElements.forEach((el) =>
          el.classList.toggle('is-fixed', entry.intersectionRatio < 1),
        );

error: patch failed: core/themes/olivero/js/navigation-utils.js:128
error: core/themes/olivero/js/navigation-utils.js: patch does not apply
mgifford’s picture

Issue tags: +wcag211

Yes, that could be a failure of a few SC https://www.w3.org/WAI/WCAG21/Techniques/failures/F55

Just tagging it for 2.1.1.

gauravvvv’s picture

Updating attributions.

smustgrave’s picture

Status: Needs review » Needs work

Still needs a test case from what I can see.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Title: Olivero: Header menu should not close if menu item has focus » Header menu should not close if menu item has focus
Issue tags: -JavaScript +JavaScript

The Olivero theme was approved for removal in #3590816: [policy, no patch] Deprecate Olivero and move to contrib.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3595082: [meta] Tasks to deprecate the Olivero theme and the removal work in #3595085: [meta] Tasks to remove the Olivero theme.

quietone’s picture

Status: Needs work » Postponed