4931 Commits

Author SHA1 Message Date
dario-piotrowicz 19c61bf859 docs(service-worker): improve service worker guides (#43508)
improve slightly the angular.io guides related to service workers, by
means of fixes, styling, information and clarity changes

PR Close #43508
2021-09-22 17:48:39 +00:00
George Kalpakas d5881329cd build(docs-infra): upgrade cli command docs sources to eb7fba335 (#43533)
Updating [angular#12.2.x](https://github.com/angular/angular/tree/12.2.x) from
[cli-builds#12.2.x](https://github.com/angular/cli-builds/tree/12.2.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/56c5962df...eb7fba335):

**Modified**
- help/new.json

PR Close #43533
2021-09-22 16:56:54 +00:00
Xiaohanxu1996 1e03bed706 docs: remove duplicate import from @angular/core (#43530)
PR Close #43530
2021-09-22 16:16:05 +00:00
George Kalpakas 3cc8c7ee25 fix(docs-infra): add a "skip to content" link for better accessibility (#43460)
Add a link at the top of the page that allows skipping directly to the
main content area. This allows people using assistive technologies to
skip navigation-related parts of the page which are presented before the
main content.

Related resources:
- [www.w3.org](https://www.w3.org/TR/WCAG20-TECHS/G1.html)
- [accessibility.oit.ncsu.edu](https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content)
- [css-tricks.com](https://css-tricks.com/how-to-create-a-skip-to-content-link)

---
Example implementations on other websites:

- **[accessibility.oit.ncsu.edu](https://accessibility.oit.ncsu.edu/)**:
  ![accessibility.oit.ncsu.edu](https://user-images.githubusercontent.com/8604205/133285834-db1314e6-ff71-4862-8f80-c8a9f69083d9.png)

- **[smile.amazon.com](https://smile.amazon.com/)**:
  ![smile.amazon.com](https://user-images.githubusercontent.com/8604205/133285854-1163e733-8de3-4244-bc23-5cd5a943001d.png)

- **[chase.com](https://chase.com/)**:
  ![chase.com](https://user-images.githubusercontent.com/8604205/133293396-ade9d95f-56ce-4cdc-8926-b4cd2dc6c3a5.png)

- **[css-tricks.com](https://css-tricks.com/)**:
  ![css-tricks.com](https://user-images.githubusercontent.com/8604205/133285845-702045ee-088a-40f1-bb26-21adebb02505.png)

- **[github.com/angular/angular](https://github.com/angular/angular)**:
  ![github.com/angular/angular](https://user-images.githubusercontent.com/8604205/133921259-9fd759b9-f862-47c3-b069-643912df17a1.png)

- **[news.sky.com](https://news.sky.com/)**:
  ![news.sky.com](https://user-images.githubusercontent.com/8604205/133285863-89946096-5353-4b2b-ab69-eb748bdcfe06.png)

- **[youtube.com](https://youtube.com/)**:
  ![youtube.com](https://user-images.githubusercontent.com/8604205/133921261-a68a12c1-1aea-4ad0-8457-b4eaf8ed3497.png)

---
Angular.io implementation:

- **[angular.io](https://angular.io/)**:
  ![angular.io](https://user-images.githubusercontent.com/8604205/133409634-0054625c-d14b-4ebe-bb4c-142cfc524d98.png)

Fixes #42936

PR Close #43460
2021-09-21 16:12:40 +00:00
George Kalpakas 875bbd3d4e fix(docs-infra): correctly handle in-page anchor links (#43460)
Previously, anchor links that were supposed to point to fragments inside
the current page (e.g. `href="#something"`) would end up navigating to
the homepage (`/`). This was due to them being resolved relative to the
base URL, which is set to `/` (via `<base href="/">`). See also
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base#in-page_anchors.

This commit fixes this issue by handling such links specially in
`LocationService#handleAnchorClick()` and prepending the current path to
the URL.

This will also be useful for implementing a "skip to content" link as
described in #42936.

PR Close #43460
2021-09-21 16:12:40 +00:00
George Kalpakas cea9d04330 fix(docs-infra): focus elements when scrolling to them (if focusable) (#43460)
When using `ScrollService#scrollToElement()` to scroll to a specific
element, also focus the element if it is focusable (i.e. if it has a
`focus()` method).

This will be useful for implementing a "skip to content" link as
described in #42936.

PR Close #43460
2021-09-21 16:12:40 +00:00
George Kalpakas b07642cf57 fix(docs-infra): improve accessibility of contributor cards (#43460)
Improve the accessibility of contributor cards (in `/about`) by making
them easier to navigate via keyboard:

- Show the (otherwise hidden) contributor info links on focus.
- Make the "View bio" link focusable via keyboard (to give a clearer
  indication that users can click to view the bio - although technically
  the click is handled by an ancestor).
- Make the flipped cards focusable via keyboard (so it is possible to
  click them to unflip).

PR Close #43460
2021-09-21 16:12:40 +00:00
George Kalpakas b9900cea7e fix(docs-infra): improve accessibility of button groups (#43460)
Improve the accessibility of button groups (such as those seen in
`/about` and `/resources` to choose between the different categories)
by making them easier to navigate via keyboard:

- Make the individual buttons focusable via keyboard.
  (Previously, they were not focusable - despite being anchor elements,
  because they were lacking an `href` attribute.)

- Give focused buttons a different style.

PR Close #43460
2021-09-21 16:12:40 +00:00
Teri Glover aa8e8db047 docs: Edits to remove jargon (#42928)
PR Close #42928
2021-09-20 22:50:59 +00:00
Teri Glover 8e283cb24c docs: Edits to remove jargon (#42918)
PR Close #42918
2021-09-20 22:50:15 +00:00
Teri Glover 859e53b465 docs: Edits to remove jargon (#42912)
PR Close #42912
2021-09-20 22:49:26 +00:00
Virginia Dooley 2690315b3e docs: reviewed tag added (#43493)
PR Close #43493
2021-09-20 17:09:50 +00:00
Virginia Dooley 41d6f3caee docs: reviewed tag added (#43490)
PR Close #43490
2021-09-20 17:09:21 +00:00
Kristiyan Kostadinov 6ad195909c docs: fix graphic in safari (#43502)
Fixes that the "Loved by millions" graphic doesn't look correctly on Safari.

Note that this fix is somewhat repetitive, but I couldn't find a better one. These are the other things I tried:
* Setting units on the size of `#angular-logo`.
* Setting the size of `#angular-logo` inside the `style` tag.
* Setting the size with inline styles.

Fixes #43498.

PR Close #43502
2021-09-20 17:07:11 +00:00
dario-piotrowicz 020f0d3858 fix(docs-infra): improve aio contributors page responsiveness (#43355)
Improve the aio contributors page responsiveness regarding the browser's
font-size so that the page looks good regarding on font-size settings
(no cropped or cramped content)

PR Close #43355
2021-09-20 16:02:24 +00:00
Virginia Dooley 909c7060f0 docs: reviewed tag added (#43492)
PR Close #43492
2021-09-17 18:46:09 +00:00
Virginia Dooley 96cb91c5eb docs: review tag added (#43471)
PR Close #43471
2021-09-17 18:35:42 +00:00
Teri Glover 326e3796c9 docs: Edits to remove jargon (#42986)
PR Close #42986
2021-09-17 18:35:10 +00:00
Teri Glover 4e30381afd docs: Edits to remove jargon (#43017)
PR Close #43017
2021-09-17 18:10:40 +00:00
Virginia Dooley 4c9346b7be docs: reviewed tag added (#43491)
PR Close #43491
2021-09-17 17:57:56 +00:00
Mwiku 84ec3c3cb6 docs: describe your change... (#43455)
Use the --defaults option when creating the application to make CSS the default styling processor.
PR Close #43455
2021-09-17 17:54:24 +00:00
Teri Glover 5a888f1b30 docs: Edits to remove jargon (#43045)
PR Close #43045
2021-09-17 16:39:19 +00:00
Teri Glover ed235bdce9 docs: Edits to remove jargon (#42999)
PR Close #42999
2021-09-17 16:07:03 +00:00
Virginia Dooley 9231c5d513 docs: reviewed tag added (#43479)
PR Close #43479
2021-09-17 01:32:54 +00:00
Pete Bacon Darwin a50d77c898 docs: remove http example dependency on 3rd party service (#43475)
Previously the `http` example did accessed the npmsearch.com website to demonstrate response caching.
But if this service became unavailable then the example (and its e2e tests) would fail.

This commit changes the example to use the in-memory-web-api for this lookup, which will not be affected by 3rd party outages.

The guide that references this example has been updated to avoid references to the original npm search service.

PR Close #43475
2021-09-16 15:59:05 +00:00
Teri Glover b28ddae8a8 docs: Edits to remove jargon (#43067)
PR Close #43067
2021-09-15 22:53:15 +00:00
Teri Glover c9884b612e docs: Edits to remove jargon (#43052)
PR Close #43052
2021-09-15 22:49:49 +00:00
Virginia Dooley efec149ba7 docs: review tag added (#43466)
PR Close #43466
2021-09-15 21:44:19 +00:00
Virginia Dooley def6315a76 docs: update reviewed tag (#43452)
PR Close #43452
2021-09-15 10:49:06 -07:00
dario-piotrowicz 10b16d8498 refactor(docs-infra): introduce max-len 120 eslint rule (#43439)
add the max-len rule to the aio eslintrc and fix what code
breaks such rule

PR Close #43439
2021-09-15 10:47:35 -07:00
dario-piotrowicz f08e4dba56 refactor(docs-infra): fix typos in app component (and its tests) (#43439)
fix some minor typos found in the app.component.ts and
app.component.spec.ts files

PR Close #43439
2021-09-15 10:47:35 -07:00
Pete Bacon Darwin ba80ab31f2 docs: move i18n angular.json snippets to external file (#43216)
Note that because `angular.json` is a "boilerplate" file we cannot
just add comments to the one that is actually used in the application.

Instead this commit makes a copy, which is annotated with docregions.
To ensure that this file is not ignored by the example-collector, we had to
update the `.gitignore` to not ignore this file. (This also allows the file to be
easily stored tracked in git).

PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin 5f3abd257b build(docs-infra): support overriding boilerplate files in examples (#43216)
It is now possible to specify file paths in the `"boilerplate-override"`
property of `example-config.json` files to tell the example boilerplate
system to use the file in the example directory rather than overwriting the
example file with that from the boilerplate directory.

PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin d6a3078097 build(docs-infra): indent docplaster markers to the level of the docregion (#43216)
This change makes docplaster markers fit better with the surrounding code
that is being rendered.  Instead of:

```
{
  "a": 100,
// ...
  "b": 200,
// ...
}
```

you can now get

```
{
  "a": 100,
  // ...
  "b": 200,
  // ...
}
```

PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin 3d2dc18f57 build(docs-infra): switch JSON examples to use inline docregion comments (#43216)
Now JSON files should be commented using

```
// #docregion
```

rather than

```
/* #docregion */
```

There are currently no JSON files with either kind of comments so this change
has no impact yet.

But when we add some examples with such comments, they will also benefit
from `// ... ` style docplasters to join docregion fragments.

PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin 14f5f58fbf docs: move duplicate custom id snippets to external examples (#43216)
PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin 88f5957c71 docs: move nginx and apache config blocks to external files (#43216)
PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin d25fbc3f22 build(docs-infra): support docregions in .conf files (#43216)
This commit tells the docregion parser how to process files that end in `.conf`.

PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin 6461ef7a67 docs: move plural function example to external file (#43216)
PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin aca61ad1dd docs: move global locale import to external example file (#43216)
PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin 5d36ceb276 docs: move shell snippets to external example files (#43216)
PR Close #43216
2021-09-15 10:46:46 -07:00
Pete Bacon Darwin 35f1d2b91e build(docs-infra): support docregions in .sh example files (#43216)
This commit tells the docregion parser how to process `.sh` files.

PR Close #43216
2021-09-15 10:46:46 -07:00
Joe Martin (Crowdstaffing) 2050b0898b docs: update grammar (#43451)
Update grammar per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 5af9404cba docs: update grammar (#43451)
Update grammar per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) d5c58414ab docs: update link (#43451)
Update link per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 69035dd52d docs: update punctuation (#43451)
Update punctuation per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 1a3a87057a docs: update grammar (#43451)
Update grammar per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 75abf868c0 docs: update spelling (#43451)
Update spelling per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) f099d9c0ea docs: update capitalization (#43451)
Update capitalization per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
David Shevitz 2f94ac374a docs: add guidelines for localizing angular documentation (#43314)
PR Close #43314
2021-09-14 08:32:51 -07:00