Problem/Motivation

The Powered-by-Drupal block has a role="complementary" to treat it as a landmark region for assistive technology.

This is overkill - the block just contains a short sentence and a link.

If there are too many landmark regions, their usefulness is diluted. Landmark regions are intended to denote the main layout regions of the page (e.g. header, footer, main menu, main content, sidebar), or important controls which the user is likely to need to find quickly (e.g. log-out, search, notifications, or shopping cart summary).

The powered-by-Drupal block doesn't count as any of these. It's effectively an advert for the CMS, which meansit is very unlikely to be relevant to the content of the page at all. If a local authority has a page about recycling facilities, the fact that the page is powered by Drupal isn't an important thing for users to locate.

Proposed resolution

Remove the role attribute from the Powered-by-Drupal block.

Remaining tasks

  • DONE. Remove role attribute.
  • DONE. Update tests.

User interface changes

Reduce over-use of landmark roles.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
425 bytes

Status: Needs review » Needs work

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

andrewmacpherson’s picture

Status: Needs work » Needs review
FileSize
1.64 KB
1.08 KB

This patch removes the associated test too.

Also, this comment in StandardTest.php is nonsense; that's not what it is testing at all...

    // Verify we have role = aria on system_powered_by and help_block
    // blocks.

The complementary landmark region role was added in #1183042: Regression: Add WAI-ARIA roles to Core blocks. Looking back at the list of roles added by that issue, it's overblown. It amounts to "let's treat every block as a landmark region" without considering whether they would actually be helpful, or the fact that most of our theme regions also have a landmark role. Drupal core is using landmark region roles gratuitously.

I wondered whether to expand the scope of this issue to removing other unnecessary landmark roles, but I think it would be quicker to clean them up with small issues, one at a time.

andrewmacpherson’s picture

Issue summary: View changes
andrewmacpherson’s picture

Issue summary: View changes
Issue tags: +Global2020, +Bug Smash Initiative

This is a quick win. It's a good one to review during the Accessibility Bug Bash during DrupalCon Global 2020.

NickGee’s picture

Tested as working:

* #4 patch applies cleanly
* web/core/profiles/standard/tests/src/Functional/StandardTest.php passes
* complementary role removed from `powered by Drupal` block

theMusician’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm what NickGee wrote.

  • Patch applies cleanly
  • The complementary role is removed
alexpott’s picture

Title: Remove landmark region role from Powered-by-Drupal block. » [backport] Remove landmark region role from Powered-by-Drupal block.

Reading https://www.w3.org/WAI/PF/aria/roles#complementary says

The complementary role indicates that contained content is relevant to the main content.

So yep this is wrong.

Committed 47a7b73 and pushed to 9.1.x. Thanks!

Going to ping other committers about backporting this.

  • alexpott committed 47a7b73 on 9.1.x
    Issue #3155462 by andrewmacpherson: Remove landmark region role from...
alexpott’s picture

Title: [backport] Remove landmark region role from Powered-by-Drupal block. » Remove landmark region role from Powered-by-Drupal block.
Version: 9.1.x-dev » 8.9.x-dev
Status: Reviewed & tested by the community » Fixed

@catch, @larowlan and @lauriii all +1 the backport to 8.9.x.

  • alexpott committed 2ae9c22 on 9.0.x
    Issue #3155462 by andrewmacpherson: Remove landmark region role from...

  • alexpott committed 72fa05e on 8.9.x
    Issue #3155462 by andrewmacpherson: Remove landmark region role from...

Status: Fixed » Closed (fixed)

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