Commit Graph

4943 Commits

Author SHA1 Message Date
dario-piotrowicz a1633c1c6e 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 a2eae02b44 build(docs-infra): upgrade cli command docs sources to 5af45a096 (#43532)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/2621e1d39...5af45a096):

**Modified**
- help/new.json

PR Close #43532
2021-09-22 16:19:12 +00:00
Xiaohanxu1996 6e5f59fe61 docs: remove duplicate import from @angular/core (#43530)
PR Close #43530
2021-09-22 16:16:05 +00:00
Renovate Bot 6ce6beb1d6 build: lock file maintenance (#43513)
PR Close #43513
2021-09-21 17:44:00 +00:00
George Kalpakas d1baf7cdfb 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:39 +00:00
George Kalpakas 4dd107d18c 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:39 +00:00
George Kalpakas 235e4aaa25 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:39 +00:00
George Kalpakas 0e2ff28627 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:39 +00:00
George Kalpakas a072c96305 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:39 +00:00
Teri Glover 7d6ba72b90 docs: Edits to remove jargon (#42928)
PR Close #42928
2021-09-20 22:50:58 +00:00
Teri Glover bba683bb68 docs: Edits to remove jargon (#42918)
PR Close #42918
2021-09-20 22:50:15 +00:00
Teri Glover 6ba6bdf768 docs: Edits to remove jargon (#42912)
PR Close #42912
2021-09-20 22:49:26 +00:00
Virginia Dooley e41a583c40 docs: reviewed tag added (#43493)
PR Close #43493
2021-09-20 17:09:50 +00:00
Virginia Dooley 5f86650789 docs: reviewed tag added (#43490)
PR Close #43490
2021-09-20 17:09:20 +00:00
Kristiyan Kostadinov 258b472aa5 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:10 +00:00
dario-piotrowicz 80f5a4e7fb 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 91183eb142 docs: reviewed tag added (#43492)
PR Close #43492
2021-09-17 18:46:08 +00:00
Virginia Dooley 046b35f701 docs: review tag added (#43471)
PR Close #43471
2021-09-17 18:35:42 +00:00
Teri Glover 3d090ba74d docs: Edits to remove jargon (#42986)
PR Close #42986
2021-09-17 18:35:10 +00:00
Teri Glover 33708f256d docs: Edits to remove jargon (#43017)
PR Close #43017
2021-09-17 18:10:40 +00:00
Virginia Dooley cabbff6f92 docs: reviewed tag added (#43491)
PR Close #43491
2021-09-17 17:57:55 +00:00
Mwiku 928e1e2275 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 312e421ff3 docs: Edits to remove jargon (#43045)
PR Close #43045
2021-09-17 16:39:19 +00:00
Teri Glover 313ea92534 docs: Edits to remove jargon (#42999)
PR Close #42999
2021-09-17 16:07:03 +00:00
Virginia Dooley b040e78e0a docs: reviewed tag added (#43479)
PR Close #43479
2021-09-17 01:32:54 +00:00
Pete Bacon Darwin 7efa47075c 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 18dc2a9be0 docs: Edits to remove jargon (#43067)
PR Close #43067
2021-09-15 22:53:14 +00:00
Teri Glover b104142b59 docs: Edits to remove jargon (#43052)
PR Close #43052
2021-09-15 22:49:48 +00:00
Virginia Dooley 95a1758c72 docs: review tag added (#43466)
PR Close #43466
2021-09-15 21:44:18 +00:00
Virginia Dooley e5d08c1902 docs: update reviewed tag (#43452)
PR Close #43452
2021-09-15 10:49:05 -07:00
dario-piotrowicz 66c6dbdc79 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 4ef9d247b6 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 1986407ab5 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:45 -07:00
Pete Bacon Darwin 79aa784168 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:45 -07:00
Pete Bacon Darwin 758ba0f0f9 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:45 -07:00
Pete Bacon Darwin a73aaa9396 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:45 -07:00
Pete Bacon Darwin c464bb4555 docs: move duplicate custom id snippets to external examples (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin 04e41b8c35 docs: move nginx and apache config blocks to external files (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin ad04c1bc62 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:45 -07:00
Pete Bacon Darwin c0988d6f52 docs: move plural function example to external file (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin 602a127d08 docs: move global locale import to external example file (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin eb0c1475ab docs: move shell snippets to external example files (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin c77c8b7913 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:45 -07:00
Joe Martin (Crowdstaffing) 02ccceb17e docs: update grammar (#43451)
Update grammar per review.

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

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

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

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

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

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

PR Close #43451
2021-09-14 15:51:30 -07:00