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
3 changes: 2 additions & 1 deletion frontend/src/components/HomePage.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ main.home {
color: var(--photo-eyebrow);
}

.home-band h2 {
/* The first band's heading is the page's <h1>, the others <h2>; all look the same */
.home-band :is(h1, h2) {
font-family: var(--font-display);
font-weight: 400;
font-size: clamp(2.2rem, 4.5vw, 3.5rem);
Expand Down
15 changes: 8 additions & 7 deletions frontend/src/components/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ import './HomePage.css';
* later. When it does, see the note in the food band below.
*
* Accessibility:
* - The page has one visible <h1>, "Welcome to Wine not?", styled as the
* small line above the first band's heading, and one <h2> per band, so
* screen reader users can jump between the bands by heading. (Earlier
* the <h1> was hidden text for screen readers only; we use visible text
* or aria-label instead of hidden helper elements.)
* - The first band's heading, "Find wines that match your taste", is the
* page's <h1>, and the two other bands have an <h2> each, so screen
* reader users can jump to the start of the page and between the bands
* by heading. It looks the same as the <h2>s. (Earlier the <h1> was
* hidden text for screen readers only; we use visible text or
* aria-label instead of hidden helper elements.)
* - Each band is a <section> named by its heading (aria-labelledby).
* - The photos are decorative (alt=""): the text says where each band
* leads. A dark veil behind the text keeps the white text at 4.5:1 or
Expand Down Expand Up @@ -65,8 +66,8 @@ export default function HomePage() {
height={807}
fetchPriority="high"
/>
<h1 className="home-eyebrow">Welcome to Wine not?</h1>
<h2 id="home-explore">Find wines that match your taste</h2>
<p className="home-eyebrow">Explore by taste</p>
<h1 id="home-explore">Find wines that match your taste</h1>
<p className="home-lead">
See how wines compare on body and acidity, and pick one from the map.
</p>
Expand Down