Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.

Accessibility fix, switch attribute from "lang" to "data-lang" #85

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

mkaz
Copy link
Owner

@mkaz mkaz commented Sep 7, 2020

  • Uses commits from @CarlosLongarela that change the attributs.
  • Adds a deprecated property to the block

IN PROGRESS

This PR does not work as expected, if using an older block with the "lang" attribute, the deprecation does not get run and the attribute does not get read or converted properly.

To test:

  • Create a post with the trunk version of the block, add a code block with language
  • Apply the PR, and rebuild
  • Open the post in the Editor and the block is invalidated

CarlosLongarela and others added 5 commits July 20, 2021 06:36
- Adds the old attribute to deprecation for lang="javascript"
this is supposed to migrate to data-lang="javascript"

- Add old save function

NOTE: This does not work, an old block still shows as invalid.
@mkaz mkaz force-pushed the update/data-lang branch from fc8868b to 62807ad Compare July 23, 2021 14:55
@mkaz
Copy link
Owner Author

mkaz commented Jul 24, 2021

I've determined the cause of why this deprecation is not working and filed a ticket at:
WordPress/gutenberg#33672

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants