bcquality/microsoft/knowledge/ui/semantic-styles-need-independent-textual-meaning.md
Jesper Schulz-Wedde 2b5550c346
Some checks failed
Validate knowledge index / validate-index (push) Has been cancelled
Validate AL review fixtures / validate-review-fixtures (push) Has been cancelled
Validate frontmatter and structure / validate (push) Has been cancelled
Improve partner onboarding and documentation navigation (#174)
Lead with a complete plugin quick start and add task-oriented usage, troubleshooting, customization, and contribution guides. Preserve the broader plugin framing, correct conflicting contract guidance, support Agents folder reviews, and align repository validation. Convert existing sample references to clickable links without changing knowledge rules.

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-09 17:31:03 +02:00

34 lines
1.9 KiB
Markdown

---
bc-version: [all]
domain: ui
keywords: [style, favorable, unfavorable, ambiguous, color, accessibility]
technologies: [al]
countries: [w1]
application-area: [all]
---
# Semantic styles need independent textual meaning
## Description
Three `Style` values carry semantic meaning through color and must be backed by text that conveys the same meaning:
- `Favorable` (Bold + Green) — implies a positive outcome.
- `Unfavorable` (Bold + Italic + Red) — implies a negative outcome.
- `Ambiguous` (Yellow) — implies an uncertain or mixed outcome.
For accessibility, assume the style is completely invisible to the user. The semantic meaning must be independently determinable from at least one of:
1. The **field caption** matches the semantic meaning (e.g. caption "Error" with `Style = Unfavorable`, or "Profit" with `Style = Favorable`).
2. The **field value** communicates the meaning (e.g. value "Success!" with Favorable, a negative number with Unfavorable).
3. An **adjacent field** provides a textual representation of the semantic meaning (e.g. a "Status" column reads "High" / "Medium" / "Low" alongside a percentage field).
The rule applies equally whether `Style` is set to a literal value or to a variable that evaluates to a semantic style at runtime.
## Best Practice
When you reach for `Favorable`, `Unfavorable`, or `Ambiguous`, verify that the caption, value, or an adjacent column already conveys the same meaning. See sample: [`semantic-styles-need-independent-textual-meaning.good.al`](semantic-styles-need-independent-textual-meaning.good.al).
## Anti Pattern
Applying a semantic style for purely cosmetic emphasis (e.g. green company name for aesthetics), or using semantic colors where only the color reveals the threshold (e.g. confidence percentages with no qualitative label). See sample: [`semantic-styles-need-independent-textual-meaning.bad.al`](semantic-styles-need-independent-textual-meaning.bad.al).