-
Notifications
You must be signed in to change notification settings - Fork 1
WEB-2466: Update to hero image on homepage #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
|
||
|
|
@@ -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> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. DetailsRoles 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> | ||
|
|
||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.