Skip to content
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

docs: clarify usage of very low opacity on some inputs #2963

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/checkbox/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@
}
}

/**
* The input is visually hidden (with opacity), and remains accessible using assistive tech.
* It is still sized and positioned where it would naturally be present so that touch users can find it with haptics.
*/
.spectrum-Checkbox-input {
color: var(--mod-checkbox-control-color-default, var(--spectrum-checkbox-control-color-default));

Expand All @@ -423,6 +427,7 @@
inline-size: 100%;
block-size: 100%;

/* @todo Look into replacing with opacity 0. The tiny opacity value appears to be a workaround for a ChromeVox legacy bug (circa 2018). */
opacity: 0.0001;
z-index: 1;

Expand Down
5 changes: 5 additions & 0 deletions components/dial/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,17 @@
}
}

/**
* The input is visually hidden (with opacity), and remains accessible using assistive tech.
* It is still sized and positioned where it would naturally be present so that touch users can find it with haptics.
*/
.spectrum-Dial-input {
/* Remove the margin for input in Firefox and Safari. */
margin: 0;
padding: 0;
position: absolute;
overflow: hidden;
/* @todo Look into replacing with opacity 0. The tiny opacity value appears to be a workaround for a ChromeVox legacy bug (circa 2018). */
opacity: 0.000001;
cursor: default;
appearance: none;
Expand Down
5 changes: 5 additions & 0 deletions components/slider/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@
}
}

/**
* The input is visually hidden (with opacity), and remains accessible using assistive tech.
* It is still sized and positioned where it would naturally be present so that touch users can find it with haptics.
*/
.spectrum-Slider-input {
/* Remove the margin for input in Firefox and Safari. */
margin: 0;
Expand All @@ -375,6 +379,7 @@
inset-block-start: var(--mod-slider-input-top-size, var(--spectrum-slider-input-top-size));
inset-inline-start: var(--mod-slider-input-left, var(--spectrum-slider-input-left));
overflow: hidden;
/* @todo Look into replacing with opacity 0. The tiny opacity value appears to be a workaround for a ChromeVox legacy bug (circa 2018). */
opacity: 0.000001; /* stylelint-disable-line number-max-precision */
cursor: default;
appearance: none;
Expand Down
Loading