Skip to content

Commit

Permalink
Add background to focus (ILIAS-eLearning#4100)
Browse files Browse the repository at this point in the history
* Add a border on a white background to focus

* Fix Webdav View-Control

* Line Break issue in mainbar on Small Screens when focused.

* Fix issues from review
  • Loading branch information
swiniker authored Mar 17, 2022
1 parent 398dd0f commit f33dc35
Show file tree
Hide file tree
Showing 17 changed files with 355 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function buildGUIFromGivenMountInstructions($a_mount_instructions, $a_ren

// Add view control and legacy add the beginning of the array (so they will be rendered first)
$header_comps = array(
$f->legacy("<div style='text-align: center'>"),
$f->legacy("<div class='webdav-view-control'>"),
$view_control,
$f->legacy("</div>"),
$js_function_legacy);
Expand Down
7 changes: 7 additions & 0 deletions src/UI/templates/default/Breadcrumbs/breadcrumbs.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
&:hover {
color: @il-standard-page-breadcrumbs-active-color;
}
&:focus {
border: @il-focus-outline-inner;

&::after {
content: none;
}
}
}

&>span+span:before {
Expand Down
5 changes: 1 addition & 4 deletions src/UI/templates/default/Button/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ input.btn{
.btn-default {
.button-variant(@il-btn-standard-color; @il-btn-standard-bg; @il-btn-standard-border);
&:focus-visible {
outline-offset: @il-focus-outline-offset;
position: relative;
}
}

.btn-primary {
.button-variant(@il-btn-primary-color; @il-btn-primary-bg; @il-btn-primary-border);
&:focus-visible {
outline-offset: @il-focus-outline-offset;
}
}

.btn, .btn.btn-tag{
Expand Down
15 changes: 14 additions & 1 deletion src/UI/templates/default/Card/card.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@
overflow: hidden;
}

.thumbnail{
&.thumbnail{
margin-bottom: 0px;

&:focus-within .il-card-repository-head {
z-index: 1;
}

a:focus-visible {
overflow: visible;
}
}
.card-highlight {
background: @il-card-highlight-bg;
Expand Down Expand Up @@ -98,6 +106,11 @@
margin-left: auto;
margin-right: auto;
}

&:focus-visible {
overflow: visible;
outline-offset: @il-focus-outline-inner-width + @il-focus-outline-outer-width - 1;
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/UI/templates/default/Item/item.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
.btn-link, a {
font-size: inherit;
line-height: @line-height-base;

&:focus-visible {
display: block;
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/UI/templates/default/MainControls/Slate/slate.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
display: flex;
margin-bottom: @il-slate-content-spacing;
position: relative;
&.engaged:after,
&.disengaged:after {
&.engaged::before,
&.disengaged::before {
font-family: "il-icons";
font-size: @il-slate-bulky-glyph-size * 0.85;
position: absolute;
right: 10px;
top: 20px;
}
&.engaged:after {
&.engaged::before {
content: " \e604";
}
&.disengaged:after {
&.disengaged::before {
content: " \e606";
}
&:focus{
Expand Down
11 changes: 8 additions & 3 deletions src/UI/templates/default/MainControls/mainbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@
line-height: @il-mainbar-btn-label-size * @line-height-large;
&:focus,
&:active {
box-shadow: none;
box-shadow: none;
}
&:focus-visible {
border: 3px solid @il-focus-color;
&:focus-visible,
&:active:focus-visible {
border: @il-focus-outline-inner;
outline: none;

&::after {
content: none;
}
}
}
.bulky-label {
Expand Down
Loading

0 comments on commit f33dc35

Please sign in to comment.