style: suppress UI5 ObjectPageSubSection mouse-focus outline - #656
Draft
maximilianbraun wants to merge 2 commits into
Draft
style: suppress UI5 ObjectPageSubSection mouse-focus outline#656maximilianbraun wants to merge 2 commits into
maximilianbraun wants to merge 2 commits into
Conversation
UI5's ObjectPageSubSection applies a focus outline via the `:focus` pseudo (not `:focus-visible`) which framed the whole graph subsection in cyan when keyboard focus landed there. The active tab already conveys which section is selected, so the outline is visual noise. Note: this is a temporary blanket suppression — follow-up should tighten the selector to only the graph subsection (via a data-attribute) and switch to `:focus-visible` to preserve keyboard a11y on other subsections. Signed-off-by: Maximilian Braun (SAP) <maximilian.braun@sap.com>
Previously the override stripped the outline for any :focus state, which also removed the keyboard-navigation cue. Use `:focus:not(:focus-visible)` so pointer-focus loses the outline (no visual noise when clicking into a section) while keyboard-focus still draws the cue UI5 ships. Signed-off-by: Maximilian Braun (SAP) <maximilian.braun@sap.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UI5's
ObjectPageSubSectionpaints a cyan focus outline via the plain:focuspseudo (not:focus-visible), which framed the entire graph subsection in cyan whenever pointer focus landed there. Suppress the outline only for mouse-focus by scoping the override to:focus:not(:focus-visible); keyboard-focus still draws the cue UI5 ships.What changed
src/index.css— add a small block that removesoutline/box-shadowfromui5-object-page-sub-section:focus:not(:focus-visible)(and the equivalent shadow-DOM part). The:not(:focus-visible)guard preserves keyboard a11y on all other subsections.Why
When you click into the graph subsection, the whole frame lit up cyan. The active tab already conveys which subsection is selected, so the outline was visual noise — and worse, it stayed up during graph interaction.
Initial commit was a blanket
:focussuppression, which also stripped the keyboard-navigation cue. Second commit tightened it to:focus:not(:focus-visible)so:This is a temporary blanket suppression across all ObjectPageSubSections, not just the graph. A follow-up should attach a
data-subsection="graph"attribute and scope this rule to that selector only — but that's a UI5/JSX-side change that's out of scope here.Test plan
npm run type-checknpm run lintnpm run test:vi