Skip to content

Commit

Permalink
Fix: aria-label class not properly hidden (fixes adaptlearning#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshillen committed Jan 7, 2025
1 parent a1b6c57 commit 9732761
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions less/core/accessibility.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,28 @@
.component { position: relative; }
.block { position: relative; }

// jquery.a11y start
// Invisible aria-labels
// --------------------------------------------------
.aria-label {
.aria-label, .visually-hidden {
display: block;
position: absolute !important;
&.relative {
position: relative !important;
}
left: 0 !important;
width: auto !important;
height: auto !important;
overflow: auto !important;
color: rgba(0,0,0,0) !important;
background: rgba(0,0,0,0) !important;
font-size: 1px !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: 0 !important;
line-height: normal !important;
z-index: 1;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
display: none !important;
}

// Force aria-labels to hide on hidden
// --------------------------------------------------
.aria-label.aria-hidden {
display: none !important;
.aria-label-focusable, .visually-hidden-focusable {
&:not(:focus):not(:focus-within) {
.visually-hidden
}
}

// jquery.a11y start

// Hidden focus guard
// --------------------------------------------------
.a11y-focusguard {
Expand Down

0 comments on commit 9732761

Please sign in to comment.