2022-10-23 10:47:50 +07:00
|
|
|
|
@use "sass:map";
|
|
|
|
|
@use "../settings" as *;
|
|
|
|
|
|
|
|
|
|
@if map.get($modules, "utilities/accessibility") {
|
|
|
|
|
/**
|
|
|
|
|
* Accessibility & User interaction
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Based on :
|
|
|
|
|
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
|
|
|
|
|
// - sanitize.css v13.0.0 | CC0 1.0 Universal | github.com/csstools/sanitize.css
|
|
|
|
|
// ––––––––––––––––––––
|
|
|
|
|
|
|
|
|
|
// Accessibility
|
|
|
|
|
|
|
|
|
|
// Change the cursor on control elements in all browsers (opinionated)
|
2024-01-25 01:42:54 +07:00
|
|
|
|
#{$parent-selector} [aria-controls] {
|
2022-10-23 10:47:50 +07:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Change the cursor on disabled, not-editable, or otherwise inoperable elements in all browsers (opinionated)
|
2024-01-25 01:42:54 +07:00
|
|
|
|
#{$parent-selector} [aria-disabled="true"],
|
|
|
|
|
#{$parent-selector} [disabled] {
|
2022-10-23 10:47:50 +07:00
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Change the display on visually hidden accessible elements in all browsers (opinionated)
|
2024-01-25 01:42:54 +07:00
|
|
|
|
#{$parent-selector} [aria-hidden="false"][hidden] {
|
2022-10-23 10:47:50 +07:00
|
|
|
|
display: initial;
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-25 01:42:54 +07:00
|
|
|
|
#{$parent-selector} [aria-hidden="false"][hidden]:not(:focus) {
|
2022-10-23 10:47:50 +07:00
|
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// User interaction
|
|
|
|
|
// Remove the tapping delay in IE 10
|
2024-01-25 01:42:54 +07:00
|
|
|
|
#{$parent-selector} a,
|
|
|
|
|
#{$parent-selector} area,
|
|
|
|
|
#{$parent-selector} button,
|
|
|
|
|
#{$parent-selector} input,
|
|
|
|
|
#{$parent-selector} label,
|
|
|
|
|
#{$parent-selector} select,
|
|
|
|
|
#{$parent-selector} summary,
|
|
|
|
|
#{$parent-selector} textarea,
|
|
|
|
|
#{$parent-selector} [tabindex] {
|
2022-10-23 10:47:50 +07:00
|
|
|
|
-ms-touch-action: manipulation;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Pico
|
|
|
|
|
// ––––––––––––––––––––
|
|
|
|
|
|
2024-01-25 01:42:54 +07:00
|
|
|
|
#{$parent-selector} [dir="rtl"] {
|
2022-10-23 10:47:50 +07:00
|
|
|
|
direction: rtl;
|
|
|
|
|
}
|
2022-10-15 23:22:12 +07:00
|
|
|
|
}
|