Skip to content

Commit a85676b

Browse files
ktaborsLFDanLu
andauthored
Improves Dialog accessibility when zooming (#2490)
* addressing dialog accessibility when zooming * setting a min-height to the dialog content * creating a named variable for this change Co-authored-by: Daniel Lu <[email protected]>
1 parent 252940a commit a85676b

File tree

1 file changed

+8
-0
lines changed
  • packages/@adobe/spectrum-css-temp/components/dialog

1 file changed

+8
-0
lines changed

packages/@adobe/spectrum-css-temp/components/dialog/index.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ governing permissions and limitations under the License.
3636

3737
--spectrum-dialog-button-margin: var(--spectrum-global-dimension-size-200);
3838
--spectrum-dialog-content-margin-bottom: var(--spectrum-global-dimension-size-450);
39+
--spectrum-dialog-content-min-height: var(--spectrum-component-single-line-height);
3940

4041
/* 12px desktop (medium scale) and 8px mobile (large scale) */
4142
--spectrum-dialog-close-button-padding: calc(26px - var(--spectrum-global-dimension-size-175));
@@ -173,6 +174,9 @@ governing permissions and limitations under the License.
173174
*/
174175
padding: calc(var(--spectrum-global-dimension-size-25) * 2);
175176
margin: calc(var(--spectrum-global-dimension-size-25) * -2);
177+
178+
/* for zoom (a11y) and short windows */
179+
min-height: var(--spectrum-dialog-content-min-height);
176180
}
177181

178182

@@ -295,6 +299,10 @@ governing permissions and limitations under the License.
295299
}
296300

297301
@media screen and (max-width: 700px) {
302+
/* for zoom (a11y) */
303+
.spectrum-Dialog {
304+
--spectrum-dialog-padding: var(--spectrum-global-dimension-static-size-300);
305+
}
298306

299307
.spectrum-Dialog .spectrum-Dialog-grid {
300308
grid-template-columns: var(--spectrum-dialog-padding) auto 1fr auto minmax(0, auto) var(--spectrum-dialog-padding);

0 commit comments

Comments
 (0)