Broken off from #3194718: Plan for Olivero theme regions and landmark regions.

This issue is to adjust the landmark regions within the markup. Ideally there will be no visual changes, but in practice the top of the sidebar will now be aligned with the top of the content_above region.

  • Remove this meta issue from stable blocker
  • Create a new stable-blocking issue that will do the following
    • Change the social bar region's HTML wrapper to from aside to <div>
    • Change the content below region's HTML wrapper from aside to <div>
    • Change the current <main> tag into a <div>
    • Change the wrapper around the content region to a <main>

Comments

mherchel created an issue. See original summary.

mherchel’s picture

Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new2.37 KB
gauravvvv’s picture

1. Change the current <main> tag into a <div> : Verified and screenshot attached.
2. Change the content below region's HTML wrapper from aside to <div>: <aside> element changed to <div> : Verified.
3. Change the wrapper around the content region to a <main> : verified.'

Tested on live preview: https://3210199-landmark-regions-bsbshcsepiesqupllmobkmufp0yenlfq.tugboa...

thejimbirch’s picture

Status: Needs review » Reviewed & tested by the community

This looks good. Moving the into region--content template makes a lot of sense. Marking as RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3210199.patch, failed testing. View results

mherchel’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: +Needs accessibility review

Test failure is unrelated.

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.

alexpott’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Needs review

Before this can be committed we need an a11y maintainer signoff. Hence the tag from @mherchel...

bnjmnm’s picture

Status: Needs review » Needs work
StatusFileSize
new261.09 KB

This isn't the case on every page, but in some instances such as https://3210199-landmark-regions-bsbshcsepiesqupllmobkmufp0yenlfq.tugboa..., the h1 is not part of any landmark, and it's best practice that all page content be contained by landmarks

It may be possible to wiggle around this by associating the H1 with a main via aria-labelledby, but that would likely be messier than just ensuring the H1 belongs to a landmark region.

thejimbirch’s picture

If that is the case, it appears there are other regions that won't be in a landmarked element.

{{ page.highlighted }}
{{ page.breadcrumb }} - Has one because it is on thr element. But if anything else is put in this region, it wouldn't be landmarked.
{{ page.content_above }}
{{ page.content_below }}
{{ page.social }}

I suspect based on the desire to have main and sidebar in their own aria regions and not nested, the complementary role needs to be added to the remaining regions.

mherchel’s picture

Version: 9.2.x-dev » 9.3.x-dev
StatusFileSize
new13.79 KB

To address #10

@andrewmacpherson 's comment in #3194718: Plan for Olivero theme regions and landmark regions indicated that there were too many landmark regions.

I'm attaching a patch thats still a work in progress.

bnjmnm’s picture

There's some cool stuff going on in #11, but with this being a stable blocker, it seems reasonable to scope this to target objective accessibility errors. The ones requiring discussion can be in a followup.

Running axe dev tools on the front page of Umami, but with Olivero as the default theme, I get the following errors:

Aside should not be contained in another landmark: <div id="block-olivero-syndicate" class="contextual-region block block-node block-node-syndicate-block" role="complementary">
Landmarks should have a unique role or role/label/title (i.e. accessible name) combination: <nav class="toolbar-lining clearfix" role="navigation"></nav>
Landmarks should have a unique role or role/label/title (i.e. accessible name) combination <aside class="social-bar__inner" data-drupal-selector="social-bar-inner">

You'd likely need to try different pages/configs to confirm there aren't additional problems.

These are clear-cut enough to be obvious stable blockers. As long as you're not adding landmark regions in this issue, fixing these is not an affront to the other landmark related concerns brought up in #3194718: Plan for Olivero theme regions and landmark regions.

mherchel’s picture

The primary work in #11 is getting the designs to align with the accessibility needs. This is only possible in modern browsers with display: content on the <main> element, but may have some accessibility issues itself (see https://www.last-child.com/displaycontents-and-the-impact-on-accessibility/)

Is this doable? If not the design will need to change.

mherchel’s picture

Discussed this on a video chat with @bnjmnm yesterday.

  1. This was a lot more complicated than Ben realized. But I walked him through the issues.
  2. Because display: contents accessibility is still broken in Safari (https://bugs.webkit.org/show_bug.cgi?id=185679), this is a non-starter
  3. We discussed looking for JS tests that could add a CSS class for the scenario above, but we could not find any that had cross browser support (FF was the culprit in this case).
  4. This is still a stable blocker
  5. The only available solution left is to align the top of the sidebar with the top of the title. We're going to go that route and add a todo to use display: contents when the webkit bug is fixed.
mherchel’s picture

StatusFileSize
new11.47 KB

We still need to remove the display: contents part, but here's a re-roll against 9.3.x

mherchel’s picture

Status: Needs work » Needs review
StatusFileSize
new10.81 KB
new2.15 KB
new439.6 KB

This patch should resolve the issue. Note that this patch changes the design. The sidebar will now top-align with the page title. This is unavoidable (see comment 14).

Tugboat link: https://3210199-landmark-regions-2-ykfujwiputfo2f0bgckrcjkspxymgqaj.tugb...

sakthivel m’s picture

StatusFileSize
new406.71 KB
new403.15 KB

Applied the patch #16 looks good to me. Attached screenshot here.

+ RTBC

bnjmnm’s picture

This passes accessibility review, it now addresses the specific accessibility issues that the issue was created for.

The actual code changes in the patch still need to be reviewed before it can be RTBC'd. (#17 looks like it was just a before/after confirming the design change happened). I'm not able to do that part at the moment, but hopefully the accessibility signoff means another reviewer can focus on the code portion.

If a review results in additional iterations of the patch and any markup structure changes, this should get re-tagged with "needs accessibility review". If it's just css changes or attributes that don't impact accessibility, there's no need.

chetanbharambe’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new494.17 KB
new495.69 KB
new4.97 MB

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

Testing Steps:
# Goto: admin/structure/block
# Place "User login" block under sidebar region
# Go to any content
# View the content
# Check the adjustment of user login which is on the right side

Expected Results:
# The sidebar will now top-align with the page title
# Page should be accessible via screenreader with proper focus

Actual Results:
# The sidebar is not top-align with the page title

Note: Tested accessibility and everything is working perfectly. Please check the attached video for the same.

Looks good to me.
Can be a move to RTBC.

mherchel’s picture

Issue summary: View changes

  • lauriii committed 6a53356 on 9.3.x
    Issue #3210199 by mherchel, Gauravmahlawat, bnjmnm, thejimbirch: Olivero...

  • lauriii committed 0e73425 on 9.2.x
    Issue #3210199 by mherchel, Gauravmahlawat, bnjmnm, thejimbirch: Olivero...
lauriii’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 6a53356 and pushed to 9.3.x and cherry-picked to 9.2.x since Olivero is experimental. Thanks!

Status: Fixed » Closed (fixed)

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