Skip to content

Commit 35bdad8

Browse files
authored
Merge pull request #1135 from hydephp/fix-breadcrumbs-component-markup
Fix breadcrumbs component markup
2 parents dbbb73a + 0f7f096 commit 35bdad8

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

packages/framework/resources/views/components/breadcrumbs.blade.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
<li>
66
@if (! $loop->last)
77
<a href="{{ $path }}" class="hover:underline">{{ $title }}</a>
8+
<span class="px-1" aria-hidden="true">&gt;</span>
89
@else
910
<a href="{{ $path }}" aria-current="page">{{ $title }}</a>
1011
@endif
1112
</li>
12-
13-
@if (! $loop->last)
14-
<span class="px-1" aria-hidden="true">&gt;</span>
15-
@endif
1613
@endforeach
1714
</ol>
1815
</nav>

packages/framework/tests/Unit/BreadcrumbsComponentViewTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function testRenderedBladeView()
2828
<ol class="flex">
2929
<li>
3030
<a href="index.html" class="hover:underline">Home</a>
31+
<span class="px-1" aria-hidden="true">&gt;</span>
3132
</li>
32-
<span class="px-1" aria-hidden="true">&gt;</span>
3333
<li>
3434
<a href="foo.html" aria-current="page">Foo</a>
3535
</li>
@@ -54,12 +54,12 @@ public function testRenderedBladeViewOnNestedPage()
5454
<ol class="flex">
5555
<li>
5656
<a href="../index.html" class="hover:underline">Home</a>
57+
<span class="px-1" aria-hidden="true">&gt;</span>
5758
</li>
58-
<span class="px-1" aria-hidden="true">&gt;</span>
5959
<li>
6060
<a href="../foo/index.html" class="hover:underline">Foo</a>
61+
<span class="px-1" aria-hidden="true">&gt;</span>
6162
</li>
62-
<span class="px-1" aria-hidden="true">&gt;</span>
6363
<li>
6464
<a href="../foo/bar.html" aria-current="page">Bar</a>
6565
</li>
@@ -77,16 +77,16 @@ public function testRenderedBladeViewOnDeeplyNestedPage()
7777
<ol class="flex">
7878
<li>
7979
<a href="../../index.html" class="hover:underline">Home</a>
80+
<span class="px-1" aria-hidden="true">&gt;</span>
8081
</li>
81-
<span class="px-1" aria-hidden="true">&gt;</span>
8282
<li>
8383
<a href="../../foo/index.html" class="hover:underline">Foo</a>
84+
<span class="px-1" aria-hidden="true">&gt;</span>
8485
</li>
85-
<span class="px-1" aria-hidden="true">&gt;</span>
8686
<li>
8787
<a href="../../foo/bar/index.html" class="hover:underline">Bar</a>
88+
<span class="px-1" aria-hidden="true">&gt;</span>
8889
</li>
89-
<span class="px-1" aria-hidden="true">&gt;</span>
9090
<li>
9191
<a href="../../foo/bar/baz.html" aria-current="page">Baz</a>
9292
</li>
@@ -104,8 +104,8 @@ public function testRenderedBladeViewOnNestedIndexPage()
104104
<ol class="flex">
105105
<li>
106106
<a href="../index.html" class="hover:underline">Home</a>
107+
<span class="px-1" aria-hidden="true">&gt;</span>
107108
</li>
108-
<span class="px-1" aria-hidden="true">&gt;</span>
109109
<li>
110110
<a href="../foo/index.html" aria-current="page">Foo</a>
111111
</li>
@@ -125,8 +125,8 @@ public function testRenderedBladeViewWithAttributes()
125125
<ol class="flex">
126126
<li>
127127
<a href="index.html" class="hover:underline">Home</a>
128+
<span class="px-1" aria-hidden="true">&gt;</span>
128129
</li>
129-
<span class="px-1" aria-hidden="true">&gt;</span>
130130
<li>
131131
<a href=".html" aria-current="page"></a>
132132
</li>

0 commit comments

Comments
 (0)