Skip to content

style: suppress UI5 ObjectPageSubSection mouse-focus outline - #656

Draft
maximilianbraun wants to merge 2 commits into
mainfrom
fix/objectpage-subsection-focus-outline
Draft

style: suppress UI5 ObjectPageSubSection mouse-focus outline#656
maximilianbraun wants to merge 2 commits into
mainfrom
fix/objectpage-subsection-focus-outline

Conversation

@maximilianbraun

Copy link
Copy Markdown
Member

Summary

UI5's ObjectPageSubSection paints a cyan focus outline via the plain :focus pseudo (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 removes outline / box-shadow from ui5-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 :focus suppression, which also stripped the keyboard-navigation cue. Second commit tightened it to :focus:not(:focus-visible) so:

  • Pointer-focus (clicking into a section): outline removed.
  • Keyboard-focus (Tab to a section): outline preserved.

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-check
  • npm run lint
  • npm run test:vi
  • Open an MCP page, click into the graph subsection: confirm no cyan frame appears.
  • Same page, press Tab repeatedly until focus lands on a subsection header: confirm the UI5 keyboard-focus cue still draws.
  • Visually sanity-check other ObjectPage subsections (Members, ComponentsSelection, etc.) for unintended outline regressions.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant