angular-cn/aio/scripts
George Kalpakas d80d6ea3f6 fix(docs-infra): fix styling of `<code>` elements on older browsers (#41051)
Previously, styling of `<code>` elements utilized the `:not()` CSS
pseudo-class with multiple selectors (`:not(h1, h2, ...)`). It turns out
that older browsers (such as IE11) do not support multiple selectors in
a single `:not()` instance.
(See [MDN][1] and [CanIUse][2] for more info.)

This commit fixes `<code>` styling to use multiple separate `:not()`
instances instead (`:not(h1):not(h2)...`), so that they are styled
correctly on older browsers as well.

NOTE:
This change seems to trigger some kind of bug in LightHouse that causes
the a11y score of `/start` to be calculated as 0 (which is clearly
wrong). This happens on Linux (tested on CI and locally using the
Windows Subsystem for Linux (WSL)) - on Windows the score is computed
correctly as 98/100.
([Example failure][3])

The bug seems to be related to the layout of the content and goes away
if we change the viewport size (for example, switching to LightHouse's
`desktop` config) or make another change that affects the content's
layout (for example, reducing the padding of `<code>` elements).

To work around the issue, this commit updates the `test-aio-a11y.js`
script to test `/start-routing` instead of `/start`.

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/:not#description:~:text=Using%20two%20selectors
[2]: https://caniuse.com/css-not-sel-list
[3]: https://circleci.com/gh/angular/angular/931038

PR Close #41051
2021-03-09 08:52:51 -08:00
..
contributors build(docs-infra): add more checks to verify contributors.json data (#40369) 2021-01-11 15:32:21 -08:00
audit-web-app.js test(docs-infra): print the browser version in `audit-web-app.js` to help debugging (#41103) 2021-03-08 08:33:47 -08:00
build-404-page.js refactor: remove unused parameter in _main method invocation (#28203) 2019-01-23 10:58:38 -08:00
build-artifacts.sh ci(docs-infra): reduce verbosity of `yarn build` on CI (#26746) 2018-10-25 21:17:52 -04:00
check-environment.js build(aio): do not fail if `check-env` for the main angular project fails 2017-06-16 07:51:18 +01:00
create-preview.js ci(docs-infra): manually trigger the preview server webhook (#27458) 2018-12-04 13:59:54 -08:00
deploy-to-firebase.js ci: reduce flakiness of docs-infra `deploy-to-firebase.js` tests (#40088) 2020-12-14 11:38:32 -08:00
deploy-to-firebase.spec.js ci: reduce flakiness of docs-infra `deploy-to-firebase.js` tests (#40088) 2020-12-14 11:38:32 -08:00
payload.sh ci: migrate payload size tracking goldens to the golden directory (#36455) 2020-04-24 09:05:11 -07:00
switch-to-viewengine.js build(docs-infra): align config with what cli generates for new apps (#32923) 2019-10-04 08:27:21 -07:00
test-aio-a11y.js fix(docs-infra): fix styling of `<code>` elements on older browsers (#41051) 2021-03-09 08:52:51 -08:00
test-preview.js test(docs-infra): run basic smoke tests against PR previews (#26649) 2018-10-29 13:00:20 -04:00
test-production.sh ci(docs-infra): ignore node version in `aio_monitoring_stable` CI job (for real) (#35033) 2020-01-29 09:25:46 -08:00