Stop drawing each section's title twice on its page
Plan step 38 review: the frame's structural rule that kept a section's own <h2> for screen readers (Tailwind's [&>section>h2]:sr-only before, a showcase.css rule during the rewrite) was removed as dead weight once every section had a real heading, so each page drew its title twice, the <h1> and an identical headline under it. The <h2>s are md-visually-hidden again, the frame's comment says why, and the section page test asserts it. The Layout section's description said "window size classes"; M3's term is breakpoints. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Opus 5
parent
3027f85cef
commit
79ca9a28b4
@@ -1,6 +1,6 @@
|
||||
{{-- One section of the showcase on a page of its own, with the way on to the next. The page's
|
||||
heading names the section, so the section's own heading is only for a screen reader
|
||||
(`data-md-showcase-sections`'s own rule in resources/css/showcase.css). --}}
|
||||
heading names the section, so the section's own <h2> is `md-visually-hidden`: there for a
|
||||
screen reader's outline of the <section>, not drawn a second time under the <h1>. --}}
|
||||
|
||||
@extends('livewire-material::showcase.layout')
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<h1 class="md-type-headline-lg">{{ $sections[$section]['title'] }}</h1>
|
||||
</x-livewire-material::stack>
|
||||
|
||||
<x-livewire-material::stack gap="space800" data-md-showcase-sections>
|
||||
<x-livewire-material::stack gap="space800">
|
||||
@include('livewire-material::showcase.sections.'.$section)
|
||||
|
||||
<x-livewire-material::stack gap="space300">
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="bars" gap="space300">
|
||||
<h2 class="md-type-headline-md">App bars, toolbars and tabs</h2>
|
||||
<h2 class="md-visually-hidden">App bars, toolbars and tabs</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-app-bar></code>, <code><x-toolbar></code>, <code><x-tabs></code>, <code><x-tab></code>, <code><x-section-nav></code>, <code><x-account-menu></code> and <code><x-theme-toggle></code>.
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="buttons" gap="space300">
|
||||
<h2 class="md-type-headline-md">Buttons</h2>
|
||||
<h2 class="md-visually-hidden">Buttons</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-button></code>: label buttons, icon buttons and toggles in M3 Expressive's five sizes.
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="carousel" gap="space300">
|
||||
<h2 class="md-type-headline-md">Carousel</h2>
|
||||
<h2 class="md-visually-hidden">Carousel</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-carousel></code> and <code><x-carousel-item></code>: items that change size between M3's keylines as they scroll.
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="chips" gap="space300">
|
||||
<h2 class="md-type-headline-md">Chips</h2>
|
||||
<h2 class="md-visually-hidden">Chips</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-chip></code> — assist, filter, input and suggestion — and <code><x-chip-set></code>.
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="colour" gap="space300">
|
||||
<h2 class="md-type-headline-md">Colour</h2>
|
||||
<h2 class="md-visually-hidden">Colour</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
Every role as a <code>--md-sys-color-*</code> token, generated by
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="communication" gap="space300">
|
||||
<h2 class="md-type-headline-md">Communication</h2>
|
||||
<h2 class="md-visually-hidden">Communication</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-badge></code>, <code><x-toast></code> (the snackbar host, fed by the <code>Toasts</code> concern or <code>materialToast()</code>),
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="containment" gap="space300">
|
||||
<h2 class="md-type-headline-md">Containment</h2>
|
||||
<h2 class="md-visually-hidden">Containment</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-card></code>, <code><x-list></code> and <code><x-list-item></code>, <code><x-divider></code>, <code><x-collapse></code>,
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="data" gap="space300">
|
||||
<h2 class="md-type-headline-md">Data</h2>
|
||||
<h2 class="md-visually-hidden">Data</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-table></code>, <code><x-sort-header></code>, and Laravel's and Livewire's paginators.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<x-livewire-material::stack as="section" id="elevation" gap="space300">
|
||||
<h2 class="md-type-headline-md">Elevation</h2>
|
||||
<h2 class="md-visually-hidden">Elevation</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
Five shadow levels as <code>--md-sys-elevation-*</code>, for what floats over content.
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="fields" gap="space300">
|
||||
<h2 class="md-type-headline-md">Text fields and selection</h2>
|
||||
<h2 class="md-visually-hidden">Text fields and selection</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-input></code>, <code><x-password></code>, <code><x-textarea></code>, <code><x-select></code>, <code><x-file></code>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}"
|
||||
x-intersect.once="load()"
|
||||
>
|
||||
<h2 class="md-type-headline-md">Icons</h2>
|
||||
<h2 class="md-visually-hidden">Icons</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
Every Material Symbol (Rounded, 400, grade 0) as <code><x-icon name="…" /></code>, outlined or <code>filled</code>,
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="layout" gap="space300">
|
||||
<h2 class="md-type-headline-md">Layout</h2>
|
||||
<h2 class="md-visually-hidden">Layout</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
Widths are M3's breakpoints and nothing else: compact below 600px, then medium 600, expanded 840, large 1200
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="menus" gap="space300">
|
||||
<h2 class="md-type-headline-md">Menus</h2>
|
||||
<h2 class="md-visually-hidden">Menus</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-menu></code> with <code><x-menu-item></code>, <code><x-menu-group></code> and <code><x-menu-separator></code>.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<x-livewire-material::stack as="section" id="motion" gap="space300" x-data="{ moved: false, figure: 1204 }">
|
||||
<h2 class="md-type-headline-md">Motion</h2>
|
||||
<h2 class="md-visually-hidden">Motion</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
M3 Expressive's springs as <code>--md-sys-motion-spatial-*</code> and <code>--md-sys-motion-effects-*</code>, each with its
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="navigation" gap="space300">
|
||||
<h2 class="md-type-headline-md">Navigation</h2>
|
||||
<h2 class="md-visually-hidden">Navigation</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-navigation-bar></code> and <code><x-navigation-bar-item></code>, <code><x-navigation-rail></code>, <code><x-navigation-rail-item></code> and <code><x-navigation-rail-section></code>,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<x-livewire-material::stack as="section" id="pages" gap="space300">
|
||||
<h2 class="md-type-headline-md">Pages</h2>
|
||||
<h2 class="md-visually-hidden">Pages</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
The error pages, raised for real so an app's own <code>resources/views/errors</code> still wins, and the Markdown mail theme
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="pickers" gap="space300">
|
||||
<h2 class="md-type-headline-md">Date pickers</h2>
|
||||
<h2 class="md-visually-hidden">Date pickers</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-datepicker></code> — docked, modal and modal input; single dates and ranges. Month and weekday names, the first day of the week and the typed format follow the application's locale; <code>week-start</code> and <code>format</code> set the last two for someone who chose their own.
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="progress" gap="space300">
|
||||
<h2 class="md-type-headline-md">Progress</h2>
|
||||
<h2 class="md-visually-hidden">Progress</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-progress></code>: M3 Expressive's linear and circular progress indicators, flat or wavy, determinate or indeterminate.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="shape" gap="space300">
|
||||
<h2 class="md-type-headline-md">Shape</h2>
|
||||
<h2 class="md-visually-hidden">Shape</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
The corner scale as a <code>--md-sys-shape-corner-*</code> token, and M3 Expressive's shapes as <code><x-shape name="…" /></code>.
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="sliders" gap="space300">
|
||||
<h2 class="md-type-headline-md">Sliders</h2>
|
||||
<h2 class="md-visually-hidden">Sliders</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-slider></code>: M3 Expressive's slider on native range inputs — standard, range and centred, horizontal or vertical, five sizes, ticks, value labels and an inset icon.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="timepickers" gap="space300">
|
||||
<h2 class="md-type-headline-md">Time pickers</h2>
|
||||
<h2 class="md-visually-hidden">Time pickers</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-timepicker></code> — M3's dial and input time picker in a modal dialog, opened from a text field.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
@endphp
|
||||
|
||||
<x-livewire-material::stack as="section" id="type" gap="space300">
|
||||
<h2 class="md-type-headline-md">Type</h2>
|
||||
<h2 class="md-visually-hidden">Type</h2>
|
||||
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
M3's typescale in Google Sans Flex, each style regular and emphasized: <code>md-type-title-lg</code>, <code>md-type-emphasized-title-lg</code>.
|
||||
|
||||
Reference in New Issue
Block a user