Draw the menu item's state layer and focus ring from the classes
Plan step 36 ("Interaction is the shared classes", the user, 2026-09-14).
menu-item.css hand-rolled md-state-layer and md-focus-ring, including a
separate aria-disabled rule the class already carries; the row now renders
the classes and keeps only the inward -3px ring offset a row edge to edge
in the list needs. No md-touch-target: the row is already 48px tall.
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
7803298fe7
commit
6c30f1e3ae
@@ -130,8 +130,11 @@ it('links an item, and keeps a disabled one out of reach', function () {
|
||||
->assertSee('aria-disabled="true"', false)
|
||||
->assertSee('data-md-menu-item', false);
|
||||
|
||||
// A disabled item stays focusable and keeps its ring, but the foundation's md-state-layer class
|
||||
// (which the item renders, not a copy of its own) already withholds the layer on aria-disabled.
|
||||
expect(ComponentStylesheet::read('menu-item')->declarations("[data-md-menu-item][aria-disabled='true']"))->toMatchArray(['pointer-events' => 'none'])
|
||||
->and(ComponentStylesheet::read('menu-item')->declarations("[data-md-menu-item][aria-disabled='true']::before"))->toBe(['display' => 'none']);
|
||||
->and(ComponentStylesheet::read('menu-item')->has('[data-md-menu-item]::before'))->toBeFalse()
|
||||
->and((string) $this->blade('<x-menu-item label="Reset" disabled />'))->toContain('class="md-state-layer md-focus-ring"');
|
||||
});
|
||||
|
||||
it('separates and labels groups', function () {
|
||||
|
||||
Reference in New Issue
Block a user