Skip to content

Commit be5dbf4

Browse files
JeanMecheAndrewKushnir
authored andcommitted
docs: update guidelines.md to match best-practices.md
fixes angular#65953
1 parent 480c4dc commit be5dbf4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

adev/src/context/guidelines.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,14 @@ Here is a link to the most recent Angular style guide https://angular.dev/style-
7878
- Do NOT set `standalone: true` inside the `@Component`, `@Directive` and `@Pipe` decorators
7979
- Use signals for state management
8080
- Implement lazy loading for feature routes
81-
- Use `NgOptimizedImage` for all static images.
8281
- Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
82+
- Use `NgOptimizedImage` for all static images.
83+
- `NgOptimizedImage` does not work for inline base64 images.
84+
85+
### Accessibility Requirements
86+
87+
- It MUST pass all AXE checks.
88+
- It MUST follow all WCAG AA minimums, including focus management, color contrast, and ARIA attributes.
8389

8490
### Components
8591

@@ -104,8 +110,11 @@ Here is a link to the most recent Angular style guide https://angular.dev/style-
104110

105111
- Keep templates simple and avoid complex logic
106112
- Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
113+
- Do not assume globals like (`new Date()`) are available.
114+
- Do not write arrow functions in templates (they are not supported).
107115
- Use the async pipe to handle observables
108116
- Use built in pipes and import pipes when being used in a template, learn more https://angular.dev/guide/templates/pipes#
117+
- When using external templates/styles, use paths relative to the component TS file.
109118

110119
### Services
111120

0 commit comments

Comments
 (0)