Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2universalStack: React, accessibility
accessibilityformsduplicationlabels
Do not render two labels for a single input
If a field component already renders a label, don't add a second label element for the same input; reuse the existing one or restructure.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetsx
| 1 | <label>{label}</label> |
| 2 | <FormInput name={name} /> {/* FormInput renders its own label */} |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | <FormInput name={name} label={label} /> {/* single label */} |
Explanation (EN)
Objašnjenje (HR)