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 ruleP1universalStack: react
accessibilityuxhtmlinteractive
Make the whole clickable area the interactive element
Wrap the entire card/container in the <button> or <a> so the full surface is clickable, instead of a small inner control.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | <div className='card'> |
| 2 | <Content /> |
| 3 | <button>Share</button> |
| 4 | </div> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | <button className='card'> |
| 2 | <Content /> |
| 3 | Share |
| 4 | </button> |
Explanation (EN)
Objašnjenje (HR)