Skip to content

Commit f799c9b

Browse files
committed
Applied shelf book sort changes from testing
Added better labelling of sort lists for screen readers. Fadded out sort-item action buttons until hovering for a cleaner look.
1 parent 9c26ccf commit f799c9b

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

resources/sass/_components.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,9 @@ $btt-size: 40px;
10851085
color: #AAA;
10861086
cursor: grab;
10871087
}
1088+
button {
1089+
opacity: .6;
1090+
}
10881091
.handle svg {
10891092
margin: 0;
10901093
}
@@ -1097,6 +1100,9 @@ $btt-size: 40px;
10971100
&:hover .handle {
10981101
@include lightDark(color, #444, #FFF);
10991102
}
1103+
&:hover button {
1104+
opacity: 1;
1105+
}
11001106
a:hover {
11011107
text-decoration: none;
11021108
}

resources/views/shelves/parts/form.blade.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<div component="shelf-sort" class="grid half gap-xl">
1414
<div class="form-group">
15-
<label for="books">{{ trans('entities.shelves_books') }}</label>
15+
<label for="books" id="shelf-sort-books-label">{{ trans('entities.shelves_books') }}</label>
1616
<input refs="shelf-sort@input" type="hidden" name="books"
1717
value="{{ isset($shelf) ? $shelf->visibleBooks->implode('id', ',') : '' }}">
1818
<div class="scroll-box-header-item flex-container-row items-center py-xs">
@@ -33,16 +33,20 @@ class="icon-button px-xs py-xxs mx-xs text-bigger"
3333
</div>
3434
</div>
3535
</div>
36-
<ul refs="shelf-sort@shelf-book-list" class="scroll-box">
36+
<ul refs="shelf-sort@shelf-book-list"
37+
aria-labelledby="shelf-sort-books-label"
38+
class="scroll-box">
3739
@foreach (($shelf->visibleBooks ?? []) as $book)
3840
@include('shelves.parts.shelf-sort-book-item', ['book' => $book])
3941
@endforeach
4042
</ul>
4143
</div>
4244
<div class="form-group">
43-
<label for="books">{{ trans('entities.shelves_add_books') }}</label>
45+
<label for="books" id="shelf-sort-all-books-label">{{ trans('entities.shelves_add_books') }}</label>
4446
<input type="text" refs="shelf-sort@book-search" class="scroll-box-search" placeholder="{{ trans('common.search') }}">
45-
<ul refs="shelf-sort@all-book-list" class="scroll-box">
47+
<ul refs="shelf-sort@all-book-list"
48+
aria-labelledby="shelf-sort-all-books-label"
49+
class="scroll-box">
4650
@foreach ($books as $book)
4751
@include('shelves.parts.shelf-sort-book-item', ['book' => $book])
4852
@endforeach

resources/views/shelves/parts/shelf-sort-book-item.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
data-updated="{{ $book->updated_at->timestamp }}"
55
class="scroll-box-item">
66
<div class="handle px-s">@icon('grip')</div>
7-
<a href="{{ $book->getUrl() }}" class="text-book">@icon('book'){{ $book->name }}</a>
7+
<div class="text-book">@icon('book'){{ $book->name }}</div>
88
<div class="buttons flex-container-row items-center ml-auto px-xxs py-xs">
99
<button type="button" data-action="move_up" class="icon-button p-xxs"
1010
title="{{ trans('entities.books_sort_move_up') }}">@icon('chevron-up')</button>

0 commit comments

Comments
 (0)