Skip to content

Commit

Permalink
Merge pull request #170 from kontenta/ensure-list-semantics
Browse files Browse the repository at this point in the history
Keep list semantics for unstyled lists
  • Loading branch information
erik-epineer authored May 7, 2020
2 parents 88916b3 + 007cbc0 commit 5567332
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion resources/views/forms/partials/errors.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@if($errors->hasAny($errorsKeys = $errorsKeys ?? $name))
<ul id="{{ $errorsId }}">
<ul id="{{ $errorsId }}" role="list">
@foreach(\Illuminate\Support\Arr::wrap($errorsKeys) as $key)
@foreach(\Illuminate\Support\Arr::flatten($errors->get($key)) as $message)
<li>{{ $message }}</li>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/crumbtrail.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<nav aria-label="{{ __('Crumb trail') }}" data-kontour-widget="crumbtrail">
<ol>
<ol role="list">
@foreach($links as $link)
<li{!! url()->full() == $link->getUrl() ? ' aria-current="true"' : '' !!}>{{ $link }}</li>
@endforeach
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/itemHistory.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section data-kontour-widget="itemHistory">
<header>{{ trans('kontour::widgets.itemHistory.title') }}</header>
<ul>
<ul role="list">
@foreach($entries as $entry)
<li lang="en" data-kontour-entry-action="{{ $entry['action'] }}"@if($entry['user']) data-kontour-username="{{ $entry['user']->getDisplayName() }}"@endif>
<span>{{ ucfirst($entry['action']) }}</span>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/widgets/menu.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@include('kontour::buttons.hamburger')
<ul data-kontour-widget="menu">
<ul data-kontour-widget="menu" role="list">
@foreach($links as $heading => $headingLinks)
@if(count($headingLinks))
<li>
<small>{{ $heading }}</small>
<ul>
<ul role="list">
@foreach($headingLinks as $link)
<li{!! preg_match('#'.$link->getUrl().'#', url()->full()) ? ' aria-current="true"' : '' !!}>{{ $link }}</li>
@endforeach
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/message.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section data-kontour-widget="message">
<ol>
<ol role="list">
@foreach($messages as $message)
<li
data-kontour-message-level="{{ $message['level'] }}"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/personalRecentVisits.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@if(count($visits))
<aside data-kontour-widget="personalRecentVisits">
<header>{{ trans('kontour::widgets.personalRecentVisits.title') }}</header>
<ul>
<ul role="list">
@foreach($visits as $visit)
@if(url()->full() != $visit->getLink()->getUrl())
<li data-kontour-visit-type="{{ $visit->getType() }}"{!! empty($visit->getLink()->getDescription()) ? ' title="' . e($visit->getLink()->getName()) . '"' : '' !!}>{{ $visit->getLink() }}</li>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/teamRecentVisits.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@if(count($visits))
<aside data-kontour-widget="teamRecentVisits">
<header>{{ trans('kontour::widgets.teamRecentVisits.title') }}</header>
<ul>
<ul role="list">
@foreach($visits as $visit)
<li data-kontour-visit-type="{{ $visit->getType() }}" data-kontour-username="{{ $visit->getUser()->getDisplayName() }}"{!! empty($visit->getLink()->getDescription()) ? ' title="' . e($visit->getLink()->getName()) . '"' : '' !!}>{{ $visit->getLink() }}</li>
@endforeach
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/UserlandControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function test_menu_widget()
$response = $this->actingAs($this->user, 'admin')->get(route('userland.index'));

$response->assertSuccessful();
$response->assertSee('<ul data-kontour-widget="menu">', false);
$response->assertSee('<ul data-kontour-widget="menu" role="list">', false);
$response->assertSee('>main<', false);
$response->assertSee('<a href="' . route('userland.index') . '" aria-current="page">Userland Tool</a>', false);
$response->assertSee('>External<', false);
Expand Down

0 comments on commit 5567332

Please sign in to comment.