Skip to content

Commit 3da0489

Browse files
authored
WCAG improvements (#268)
Related to Sylius/Sylius#18026
2 parents f6c73a4 + b7db39a commit 3da0489

File tree

9 files changed

+46
-16
lines changed

9 files changed

+46
-16
lines changed

src/BootstrapAdminUi/assets/styles/_body.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* {
1111
--tblr-breadcrumb-item-active-color: var(--tblr-gray-500);
1212
--tblr-breadcrumb-divider-color: var(--tblr-gray-300);
13+
--tblr-code-color: #36393B;
14+
--tblr-blue-rgb: 17, 81, 141;
15+
--tblr-green-rgb: 0, 97, 16;
1316
}
1417

1518
[data-bs-theme=dark] {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.btn:not(.btn-sm) {
2+
min-height: 44px;
3+
min-width: 44px;
4+
}

src/BootstrapAdminUi/assets/styles/_form.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ textarea.form-control {
5555
}
5656
}
5757

58+
.form-control, .form-select {
59+
min-height: 44px;
60+
}
61+
5862
.form-control:focus {
5963
box-shadow: none;
6064
}

src/BootstrapAdminUi/assets/styles/_navbar.scss

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,33 @@
1111
&.navbar-nav {
1212
gap: 0.5rem;
1313
}
14+
}
1415

15-
&.navbar-brand-image {
16-
height: 4rem;
17-
}
16+
.navbar input {
17+
min-height: 44px;
18+
}
19+
20+
.navbar-brand-image {
21+
height: 3rem;
1822
}
1923

2024
.navbar-collapse a.nav-link,
2125
.navbar-collapse a.dropdown-item {
2226
transition: all .1s;
27+
min-height: 44px;
2328

2429
&:hover {
2530
color: var(--tblr-primary) !important;
2631
background: transparent;
2732
}
2833
}
34+
.nav-button {
35+
min-height: 44px;
36+
min-width: 44px;
37+
}
38+
.navbar-collapse .nav-link:focus-visible {
39+
outline: solid 2px rgb(153, 200, 255);
40+
}
41+
.navbar-plus-badge{
42+
width: 50px;
43+
}

src/BootstrapAdminUi/assets/styles/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@import "@tabler/core/src/scss/tabler.scss";
1313

1414
@import "body";
15+
@import "buttons";
1516
@import "accordion";
1617
@import "alert";
1718
@import "datatable";

src/BootstrapAdminUi/public/app.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BootstrapAdminUi/public/app.rtl.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BootstrapAdminUi/templates/shared/crud/common/content/header/title_block/actions.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<div class="col-12 col-md-auto ms-auto d-print-none">
44
<div class="btn-list">
5+
{% hook 'actions' %}
56
{% if resources.definition.actionGroups.main is defined %}
67
{% for action in resources.definition.getEnabledActions('main')|sylius_sort_by('position') %}
78
{{ sylius_grid_render_action(resources, action, null) }}

templates/component/new_talks.html.twig

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@
2020
<div class="col-auto">
2121
{% set firstSpeaker = talk.speakers.first %}
2222

23-
{% if firstSpeaker.avatar %}
24-
{% set avatar_path = vich_uploader_asset(firstSpeaker.avatar) %}
23+
{% if firstSpeaker %}
24+
{% if firstSpeaker.avatar %}
25+
{% set avatar_path = vich_uploader_asset(firstSpeaker.avatar) %}
2526

26-
{{ avatar.default(avatar_path, 'img-thumbnail') }}
27-
{% else %}
28-
<span class="avatar">
29-
{{ firstSpeaker.firstName|first }}{{ firstSpeaker.lastName|first }}
30-
</span>
27+
{{ avatar.default(avatar_path, 'img-thumbnail') }}
28+
{% else %}
29+
<span class="avatar">
30+
{{ firstSpeaker.firstName|first }}{{ firstSpeaker.lastName|first }}
31+
</span>
32+
{% endif %}
3133
{% endif %}
3234
</div>
3335
<div class="col text-truncate">

0 commit comments

Comments
 (0)