Problem/Motivation

Olivero's page template renders a lot of Drupal theme regions inside of <main>.

Since Olivero is destined to replace Bartik as the default theme, it's a good time to take stock of these, and decide how they will map to landmark regions for accessibility.

It's possible to have too many landmark regions, and their usefulness becomes diluted. 5-6 is nice, over 10 is likely too much. Drupal themes, in general, tend to have too many landmark regions.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

Initial brain-dump, various questions and ideas...

  • There's page.hero, page.highlighted, and page.content_above. Semantically, the difference is lost on me. Yet they all reside inside <main>, before page.content.
  • page.content_below is an complementary landmark, but page.content_above isn't. I'm confused by that.
  • page.highlighted is a complementary landmark, but page.hero isn't. I'm very confused by that too.
  • The page.sidebar is inside of <main>. The sidebars are inside main in the page template from system/stable. I've never thought that was a good idea. Bartik's sidebars aren't inside main; it gets that right in my view.
  • page.social and page.sidebar are both complementary landmarks.
  • None of the complementary landmarks have accessible names. There are 4 of them here, so if they aren't distinguishable by screen reader users, it's going to be confusing.
  • The page.social is outside of <main>. That's good, because it doesn't look like it's part of the main content visually (off to the side, with it's own grey background, and generous whitespace between it and the main content). The name of the theme region sounds like it has a fairly narrow set of intended uses, and they probably don't amount to main content.
  • Why do we have footer_top and footer_bottom theme regions, if they are both the same width, same colour, and they always stack on top of each other vertically? Bartik has several footer-* theme regions, but they change from horizontal to vertical arrangements at different viewport widths.

Overall impression: there isn't really a plan here yet. It's rather messy.

CMS theme regions don't have to map directly to accessibility tree landmark regions, but we still need to think about how to describe the overall page structure to assistive tech.

It would be great to reduce Drupal's over-use of ARIA landmark regions.

Triage: major/must-have. Ideally we should do this before marking Olivero stable, but certainly before using it as the default in Standard profile. I know that Olivero is marked as @internal and can evolve with each point release, but an ARIA landmarks plan isn't something I want to making up as we go along! It impacts at least two WCAG level-A success criteria: SC 1.3.1 Info and Relationships, and SC 2.4.1 Bypass Blocks.

andrewmacpherson’s picture

Title: Review Olivero theme regions and landmark regions » Plan for Olivero theme regions and landmark regions
mherchel’s picture

Any update on what needs to be done on this? We're really pushing hard to get stable (and default) by 9.2, which gives us one month.

mherchel’s picture

A couple responses:

There's page.hero, page.highlighted, and page.content_above. Semantically, the difference is lost on me. Yet they all reside inside <main>, before page.content.

Hero is intended for homepage carousels and the like (see https://www.pace-il.ca/ as an example). Highlighted contains the status messages and tabs.

However keep in mind that site-builders can and will put random content into each of these regions.

page.content_below is an complementary landmark, but page.content_above isn't. I'm confused by that.

That's a good point, we could easily change that. Should they be complimentary landmarks?

page.highlighted is a complementary landmark, but page.hero isn't. I'm very confused by that too.

Good point, once again easily changed if we should.

The page.sidebar is inside of . The sidebars are inside main in the page template from system/stable. I've never thought that was a good idea. Bartik's sidebars aren't inside main; it gets that right in my view.

We can make this change, although it may require significant work (haven't looked into it yet)

page.social and page.sidebar are both complementary landmarks.

Let me know if this is not okay.

None of the complementary landmarks have accessible names. There are 4 of them here, so if they aren't distinguishable by screen reader users, it's going to be confusing.

Should we hard code the accessible names when we do not know what content they will hold?

The page.social is outside of . That's good, because it doesn't look like it's part of the main content visually (off to the side, with it's own grey background, and generous whitespace between it and the main content). The name of the theme region sounds like it has a fairly narrow set of intended uses, and they probably don't amount to main content.

Why do we have footer_top and footer_bottom theme regions, if they are both the same width, same colour, and they always stack on top of each other vertically? Bartik has several footer-* theme regions, but they change from horizontal to vertical arrangements at different viewport widths.

These are not intended to be semantically different, it allows the site-builder to easily stack footer content (as opposed by having it side-by-side).

mherchel’s picture

Discussing this with @bnjmnm

Our current plan is

  • 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>
bnjmnm’s picture

#6 Makes sense, what has been discussed so far is a includes some objective, actionable issues that should absolutely be considered stable blockers. However, there are also observations here that warrant more attention but it's not yet clear if they are stable blockers. Because this issue covers a range of issues in different stages, I support creating child issues for the stable-blocking bugs, and making those the stable blockers in the roadmap, while this issue can contain both those and issues that will potentially be addressed (or at least discussed) later.

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.

andy-blum’s picture

I'm assuming some of the regions we have in Olivero are there because they were there in Bartick, so I'm including screenshots here of the region layout for both themes.

bartick region demonstration

olivero region demonstration

The first thing I notice is that we've merged a lot of Bartick's regions down together, but not quite all the way. I think we could still merge the following:

  • Highlighted & Breadcrumb into a "content_top". This would create a semantic name to the region that's not defined by its content, but rather by it's location
  • Content_above and content into "content"
  • Footer top and footer bottom into "footer"

From there, I think you could probably include the new content_top, content, content_bottom, and sidebar within the main. The sidebar currently uses an aside tag that carries an implicit "complimentary" role, so moving to a div could help here - unless we intend for the sidebar to be able to carry related, but ultimately separable information from the rest of main.

Moving from thinking about Drupal's regions to thinking about the page's landmarks....

If we're looking at 5-6 landmark regions, I think we're pretty limited.

  • banner landmark from the header element
  • navigation landmark from the primary menu
  • navigation landmark from the user account menu
  • main landmark for the content & sidebar
  • complimentary or navigation for the social sidebar
  • contentinfo landmark for the footer
mherchel’s picture

Priority: Major » Normal

Changing priority to Normal since we have all of the stable blockers addressed.

As far as combining regions, this is a tall order. We'd have to go through each one and figure out the reason why it was created. At first glance, I'm not sure that the benefit would outweigh the risks.

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.

andy-blum’s picture

As Olivero is now stable & default is there any reason/motivation to continue this issue or can it be closed?

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.

mherchel’s picture

Status: Active » Closed (works as designed)

Yeah, I'm marking this closed.