-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: aria-label class not properly hidden (fixes #606) #611
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
pointer-events: none; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the bootstrap example, is it worth adding a comment to instruct developers on its usage.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
// 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
} | ||
} | ||
|
||
// jquery.a11y start | ||
|
||
// Hidden focus guard | ||
// -------------------------------------------------- | ||
.a11y-focusguard { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the bootstrap example, is it worth adding a comment to instruct developers on its usage.
// Use to hide content visually while keeping it accessible to assistive technologies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done