Let a card's title take the heading level the page needs
<x-card> always titled itself with an <h3>, so a card straight under a page's <h1> skipped a level, which SealShare's download page did with no way round it from the application. `heading` takes h2 to h6, or div or p for a title that is not a heading, as <x-pane> and <x-app-bar> already do; h3 stays the default. The skill also says a card holds one subject, as M3 does (plan step 46). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
d557dd9b49
commit
ff5349759b
@@ -93,3 +93,10 @@ it('rings the row from the card itself when actionable, or from a has() when its
|
||||
->and($css->declarations('[data-md-card][data-md-list-row] [data-md-list-open]:focus-visible'))
|
||||
->toBe(['outline' => 'none']);
|
||||
});
|
||||
|
||||
it('titles the card at the heading level the page\'s outline needs', function () {
|
||||
expect((string) $this->blade('<x-card title="Shared files" heading="h2">Body</x-card>'))
|
||||
->toContain('<h2 data-md-card-title>Shared files</h2>')
|
||||
->and((string) $this->blade('<x-card title="Shared files" heading="span">Body</x-card>'))
|
||||
->toContain('<h3 data-md-card-title>Shared files</h3>');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user