If you view the source here... https://veterans.rutgers.edu ...it seems that "main-content" is used multiple times as an element ID. That's supposed to be unique...

Line 491
<div class="l-pr page__row pr-main" id="main-content">

Line 493
<div data-at-region="1" data-at-block-count="5" class="l-r region pr-main__content"><a id="main-content" tabindex="-1"></a>

This seems to be more a problem because of the Anchor Link...

Line 20
<a href="#main-content" class="visually-hidden focusable skip-link">Skip to main content</a>

My thinking is that the empty link should removed on Line 493. The ID in line 491 should do the job for the Anchor Link and the empty link in line 493 is bad for accessibility anyway. In addition to removing the empty link, perhaps the ID for the DIV in Line 491 should move to the DIV in Line 493.

Comments

Rutgers University created an issue. See original summary.

Rutgers University’s picture

Component: Libraries » CSS/HTML
Rutgers University’s picture

StatusFileSize
new475 bytes
Jeff Burnz’s picture

Perhaps it's a matter of giving blocks and/or regions a unique ID, so you can use any of them, that could be a fairly easy win I think, and of course removing the empty link.

Jeff Burnz’s picture

OK, lets go for it, commits coming shortly, I have really limited time so I just have to charge ahead on this one, sorry - however feel free to argue with me etc, I'm all ears.

  • Jeff Burnz committed 5f4b624 on 8.x-3.x
    Issue #2938981 by Rutgers University: Element ID "main-content" Not...
Jeff Burnz’s picture

OK, so that commit adds id's to regions and blocks, there is another commit on AT Tools module that modifies the starterkit to use the main content block ID, which by default is in the form of:

#block-THEMENAME-content

This is not backwards compatible automatically, so you will have to update it theme settings (under Markup extensions etc) or just hard code it in html.html.twig

Rutgers University’s picture

OK, lets go for it, commits coming shortly, I have really limited time so I just have to charge ahead on this one, sorry - however feel free to argue with me etc, I'm all ears.

That's fine. We don't have to argue. The main goal was to report the issue. You're the expert on the theme.

Making the IDs unique, and deleting the empty link, is the perfect fix for this.

Jeff Burnz’s picture

Cheers, the main thing I encourage everyone to discuss are the accessibility issues and other areas I don't always know about - the best practices are constantly evolving so I'm not always up to date, it's quite hard to make sense of the noise out there sometimes, and of course I miss things, the theme is pretty complex so dark corners are sometimes overlooked, even then they're staring me in the face :0

Jeff Burnz’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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