Group-labeled first child exception
ShowCaption = false is acceptable on an editable field only when all of the following conditions are met:
- microsoftlayer
- uidomain
- 2examples
- 1pull request
Rule on GitHub · microsoft layer · ui · BC all · tier official · derived
Description
ShowCaption = false is acceptable on an editable field only when all of the following conditions are met:
- The control is the first visible field in its parent group.
- The field has
ShowCaption = false. - The parent group has a visible caption:
ShowCaptionis true (the default) and the group has a non-emptyCaptionvalue.
When these three conditions hold, the group caption becomes the accessible label for the field. This works regardless of whether the field is multiline. The presence of InstructionalText on the field is irrelevant to this check.
Best Practice
Do not second-guess this exception. If the three conditions are met, the pattern is acceptable — even if the group caption seems generic (e.g. “General Information”) or does not exactly match the field name.
See sample: group-labeled-first-child-exception.good.al.
Anti Pattern
If the parent group has ShowCaption = false or no Caption, the first-child exception does not apply: the field has no accessible label anywhere.
See sample: group-labeled-first-child-exception.bad.al.
Examples
Changed by
From microsoft/BCQuality at a4593a1, MIT License, Copyright (c) 2026 Microsoft Corporation (license).