Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
inbox: Unify action button and visibility indicator focus rings.
Alya Abbottc3ea180d20ad
diff --git a/web/styles/inbox.css b/web/styles/inbox.cssindex 58e0f947c9e..26da579e0ae 100644--- a/web/styles/inbox.css+++ b/web/styles/inbox.css@@ -221,10 +221,39 @@}.channel-visibility-policy-indicator,- .visibility-policy-indicator {+ .visibility-policy-indicator,+ .inbox-action-button {display: flex;align-items: center;- border-radius: 3px;+ justify-content: center;+ /* Row-tall, row-square click area so there's+ room for the focus ring around the inner icon+ without clipping against the row's right edge.+ Centering the icon (vs. anchoring to an edge)+ keeps the focus ring symmetric around it. */+ width: 1.875em; /* 30px — matches row height */+ height: 1.875em; /* 30px — matches row height */+ /* Whole 30×30 hit area is clickable; the inner+ icon itself only spans ~16×16. Without this,+ mouse hovers at the top/bottom fall back to the+ default arrow cursor. */+ cursor: pointer;++ & > i,+ & > .zulip-icon,+ & > .recipient_bar_icon {+ /* Zero out per-icon padding; the outer button+ is the click area and the focus ring draws+ outside the icon via `outline-offset`.+ Overrides `.recipient_bar_icon`'s 6px side+ padding from message_header.css. */+ padding: 0;+ border-radius: 0.3125em; /* 5px at 16px/1em */+ }+ }++ .channel-visibility-policy-indicator,+ .visibility-policy-indicator {margin-left: 3px;}@@ -402,8 +431,6 @@}.inbox-action-button {- display: flex;- border-radius: 3px;outline: none;opacity: 0;@@ -412,9 +439,12 @@}& i {- padding: 0.3125em; /* 5px at 16px em */opacity: 0.3;- color: var(--color-vdots-hover);+ /* Match the color used by `.recipient_bar_icon` on+ the state marker icons, so the 3-dots and the+ follow/mute/unmute markers render in the same hue+ as row-attention elevates both to visible. */+ color: var(--color-message-header-icon-interactive);&:hover {opacity: 1;@@ -771,16 +801,29 @@}}+ /* Focus ring for the icon-style row actions. Outline lives on+ the wrapper (at full opacity) so the ring renders at full+ blue saturation and meets WCAG 1.4.11's 3:1 contrast+ requirement for focus indicators. Negative outline-offset+ pulls the 1.5px stroke inside the 30×30 wrapper bounds so it+ doesn't clip against the row's overflow:hidden edge, giving+ a 26×26 effective ring. The inner icon dims separately. */.channel-visibility-policy-indicator,- .visibility-policy-indicator {- &:focus-visible {- outline: 2px solid var(--color-outline-focus);- }- }-+ .visibility-policy-indicator,.inbox-action-button {&:focus-visible {- box-shadow: 0 0 0 2px var(--color-outline-focus);+ outline: var(--focus-ring-outline);+ outline-offset: -0.125em; /* -2px at 16px/1em */+ /* Match the row outline's radius so the button ring+ visibly rounds rather than reading as square — 5px on+ a 26×26 ring is too subtle to notice at 1× DPR. */+ border-radius: 0.625em; /* 10px at 16px/1em */++ > i,+ > .zulip-icon,+ > .recipient_bar_icon {+ opacity: 0.7;+ }}}