Make BCQuality aware of ToolTips definied on the source

This commit is contained in:
Kilian Seizinger 2026-07-20 09:33:34 +02:00
parent 712dee9ec1
commit 48ead8fc21
6 changed files with 68 additions and 13 deletions

View file

@ -1,7 +1,7 @@
---
bc-version: [all]
domain: ui
keywords: [tooltip, page-field, source-field, inheritance, aa0218, false-positive]
keywords: [tooltip, page-field, source-field, inheritance, aa0218, aa0234, false-positive]
technologies: [al]
countries: [w1]
application-area: [all]
@ -11,13 +11,13 @@ application-area: [all]
## Description
A page field bound to a table field inherits the source field's `ToolTip` at runtime: the control shows the table field's `ToolTip` even when the page control declares none of its own. A page field without an inline `ToolTip` is therefore not, by itself, a missing-tooltip defect — the text may be supplied by the bound source field.
A page field bound to a table field inherits the source field's `ToolTip` at runtime: the control shows the table field's `ToolTip` even when the page control declares none of its own. Table-level tooltips are the recommended placement since BC 2024 release wave 1 (CodeCop AA0234); a page-level `ToolTip` acts only as a contextual override. A page field without an inline `ToolTip` is therefore not, by itself, a missing-tooltip defect — the text may be supplied by the bound source field.
The genuinely-missing case — a bound field whose source table field also carries no `ToolTip`, or an unbound control that needs one — is already reported by the compiler analyzer AA0218, which BCQuality calibrates to `info`. That analyzer, not an agent finding, owns the missing-tooltip signal.
## Best Practice
Do not raise a missing-`ToolTip` finding for a page field that has a source-table binding; assume the source field supplies the tooltip. Reserve tooltip findings for the cases the dedicated tooltip rules define, and let analyzer AA0218 carry the mechanically-detectable missing-tooltip case at its calibrated severity.
Do not raise a missing-`ToolTip` finding for a page field that has a source-table binding; assume the source field supplies the tooltip. Reserve tooltip findings for the cases the dedicated tooltip rules define (see `../style/tooltip-required-on-page-fields.md`), and let analyzer AA0218 carry the mechanically-detectable missing-tooltip case at its calibrated severity.
## Anti Pattern

View file

@ -0,0 +1,22 @@
---
bc-version: [26..]
domain: ui
keywords: [tooltip, action, runobject, role-center, object-level, inheritance, caption, false-positive]
technologies: [al]
countries: [w1]
application-area: [all]
---
# A `RunObject` action inherits the targeted object's `ToolTip`
## Description
Since BC 2025 release wave 1, an action on a role center that specifies `RunObject` uses the `Caption`, `ToolTip`, `AboutText`, and `AboutTitle` of the targeted application object when the action itself declares none of them; a property set on the action overrides the inherited value. Where object-level tooltip text can live has since widened: `ToolTip`/`ToolTipML` became available on report objects in BC 2026 release wave 1 (runtime 17.0) and on page objects in BC 2026 release wave 2 (runtime 18.0). A navigation action with `RunObject = page X` inherits page X's object-level `ToolTip` when the action declares none of its own. An action without an inline `ToolTip` is therefore not, by itself, a missing-tooltip defect when the object it runs supplies the text.
## Best Practice
Define the tooltip on the targeted object where the platform supports it and let `RunObject` actions inherit it; set `ToolTip` on the action only when its context genuinely needs different wording. For page fields, the analogous source is the bound table field — see `bound-page-field-inherits-source-field-tooltip.md`.
## Anti Pattern
Flagging every `RunObject` action that declares no inline `ToolTip` as a missing-tooltip violation, ignoring that the action inherits the targeted object's text at runtime on BC 26 and later.