Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions web/app/themes/mitlib-parent/css/v2/pages/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,20 @@ body.v2-page {
#content > #hero {
padding: 0;
position: relative;
background-size: cover;
background-position: center center;
color: var(--color-text-on-color);

/* Decorative background image, kept out of the focusable/overlay content so role="img" has no children */
.hero-bg {
position: absolute;
inset: 0;
z-index: 0;
background-size: cover;
background-position: center center;
}

.overlay {
position: relative;
z-index: 1;
padding-top: calc(var(--content-section-vertical-padding) + var(--sp-600));
padding-bottom: var(--content-section-vertical-padding);
background: linear-gradient(90deg, #1A1A1A 24.52%, rgba(26, 26, 26, 0.50) 70.67%, rgba(26, 26, 26, 0.00) 100%);
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-parent/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Theme Name: MITlib Parent
Author: MIT Libraries
Version: 0.15
Version: 0.16
Description: The parent theme for the MIT Libraries' Pentagram-designed identity.

*/
Expand Down
9 changes: 5 additions & 4 deletions web/app/themes/mitlib-parent/templates/page-home-v2.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
get_header( 'v2' ); ?>

<main id="content">
<section id="hero" role="img" aria-label="Two notebooks opened to show yellow graph paper; the top one has a black and white photo of a boat crew, and the bottom one shows handwritten text." style="background-image: url(https://libraries.mit.edu/app/uploads/2026/07/hero-image-edgerton.png);">
<div class="overlay">
<div class="content-wrapper">
<section id="hero">
<div class="hero-bg" role="img" aria-label="Graphic illustration of a spiral in purple, black, and white." style="background-image: url(https://libraries.mit.edu/app/uploads/2026/09/hero-image-noise-reduction.jpg);"></div>
<div class="overlay">
<div class="content-wrapper">
<div class="hero-content">
<h1>Welcome to the MIT Libraries</h1>

Expand All @@ -28,7 +29,7 @@
?>

</div>
<span class="hero-image-credit">from the <a href="https://archivesspace.mit.edu/repositories/2/resources/603">Harold E. Edgerton papers</a></span>
<span class="hero-image-credit">from the <a href="https://archivesspace.mit.edu/repositories/2/resources/244">Muriel Cooper personal archives</a></span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 4.1.2: Focusable element inside a "img" role whose children are presentational.

Elements with a role that makes children presentational must not contain focusable content.

Details

Roles like button, checkbox, img, tab, and others make their children presentational — hidden from assistive technologies. If those children are focusable, keyboard users can reach elements that screen reader users cannot perceive. Move focusable content outside the parent or remove the focusability.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by moving image into a separate div with the img role.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 4.1.2: Focusable element inside a "img" role whose children are presentational.

Elements with a role that makes children presentational must not contain focusable content.

Details

Roles like button, checkbox, img, tab, and others make their children presentational — hidden from assistive technologies. If those children are focusable, keyboard users can reach elements that screen reader users cannot perceive. Move focusable content outside the parent or remove the focusability.

</div>
</div>
</section>
Expand Down