Skip to content

Commit

Permalink
a11y: Apply focus style to revision items (#57039)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Dec 14, 2023
1 parent d949e44 commit 053a8aa
Showing 1 changed file with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

.edit-site-global-styles-screen-revisions__revision-item {
position: relative;
padding-left: $grid-unit-20;
overflow: hidden;
cursor: pointer;

&:hover {
Expand All @@ -40,9 +38,20 @@
left: $grid-unit-20 + 1; // So the circle is centered on the line.
transform: translate(-50%, -50%);
z-index: 1;

// This border serves as a background color in Windows High Contrast mode.
border: 4px solid transparent;
}
&.is-selected::before {
background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
&.is-selected {
border-radius: $radius-block-ui;

// Only visible in Windows High Contrast mode.
outline: 3px solid transparent;
outline-offset: -2px;

&::before {
background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
}
}

&::after {
Expand All @@ -66,12 +75,10 @@
width: 100%;
height: auto;
display: block;
padding: $grid-unit-15 $grid-unit-15 $grid-unit-10 $grid-unit-30;
&:focus,
&:active {
outline: 0;
box-shadow: none;
}
padding: $grid-unit-15 $grid-unit-15 $grid-unit-10 $grid-unit-50;
z-index: 1;
position: relative;
outline-offset: -2px;
}
}

Expand Down

1 comment on commit 053a8aa

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 053a8aa.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7209104971
📝 Reported issues:

Please sign in to comment.