Skip to content

♿ Apply lang="en" to relevant snippets in examples/#34759

Merged
caroqliu merged 1 commit intoampproject:mainfrom
caroqliu:examples/lang
Jun 10, 2021
Merged

♿ Apply lang="en" to relevant snippets in examples/#34759
caroqliu merged 1 commit intoampproject:mainfrom
caroqliu:examples/lang

Conversation

@caroqliu
Copy link
Copy Markdown
Contributor

@caroqliu caroqliu commented Jun 8, 2021

This PR is a partial copy of #31208, which adds lang="en" to relevant code snippets in this codebase. Instead of copying the PR file-for-file, I decided to break this change up into a few root directories for ease of review and less likelihood of falling behind to merge conflicts. /to @kristoferbaxter who approved the original PR

Original PR description:

Suggested changes and additions based on the TetraLogical accessibility review commissioned by @nainar / @caroqliu

x-ref ampproject/amp.dev#4972

Others in the series: #34757 #34758
/cc @TetraLogicalHelpdesk

Copy link
Copy Markdown
Member

@alanorozco alanorozco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Not super related, but these get stripped out on inabox mode. We may need to update the RegExp here.

/**
* @param {string} html
* @return {string}
*/
const toInaboxDocument = (html) =>
html
.replace(/<html [^>]*>/, '<html amp4ads>')
.replace(getCdnJsRegExp('v0'), '$1/amp4ads-v0$2');

@caroqliu
Copy link
Copy Markdown
Contributor Author

LGTM.

Not super related, but these get stripped out on inabox mode. We may need to update the RegExp here.

/**
* @param {string} html
* @return {string}
*/
const toInaboxDocument = (html) =>
html
.replace(/<html [^>]*>/, '<html amp4ads>')
.replace(getCdnJsRegExp('v0'), '$1/amp4ads-v0$2');

This is just for the local server though? Good to know though, only searched for <html ⚡ and <html amp in these PRs 😅

@caroqliu caroqliu merged commit 2ee75c4 into ampproject:main Jun 10, 2021
westonruter added a commit to westonruter/amphtml that referenced this pull request Jun 11, 2021
…ebook-like-bento-version

* 'main' of github.com:ampproject/amphtml:
  minor updates + fix broken links (ampproject#34840)
  Add "wrapper": "bento" option to Bento components (ampproject#34838)
  ♻️ Move src/layout into core to unblock buildDOM for amp-layout (ampproject#34818)
  ♿ Apply `lang="en"` to relevant snippets in `test/` (ampproject#34768)
  Bento: Enable `npm` for `amp-video` (ampproject#34822)
  ✨[story-ads] Introduce new yellow segment progress bar v2 (ampproject#34804)
  SwG Release (ampproject#34825)
  📦 Update build-system devDependencies to v7.14.5 (ampproject#34802)
  Disable viewport warnings in experiment. (ampproject#34809)
  Apply lang="en" to examples/ (ampproject#34759)
  ✨ [Amp story] Scaffold desktop one panel experiment (ampproject#34755)
  ♻️ Migrate Style and DOM helpers into core/DOM + type-checking (ampproject#34681)
  🏗 Don't pull all externs into experiments (ampproject#34800)
  typechecking: remove pride as not compatible with rest of strategy (ampproject#34787)
  Fix forbidden terms to unblock `main` (ampproject#34799)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants