Skip to content

Commit 4bb9e7a

Browse files
authored
docs: Change "here" link to more descriptive text
Links with text like "here" or "click here" are not as easily interpretable to screen reader users as links which describe the destination in the link text rather than before/after the link. The existing text was not a failure of [SC 2.4.4](https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-in-context.html) but this change should improve its accessibility.
1 parent f6377a3 commit 4bb9e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/lexical-website/docs/react/create_plugin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ TwitterPlugin is just a React component that accesses the Lexical editor via Rea
7070
1. Verifies that there is a TweetNode registered on the editor (if you forget to register the node, you can't do #2)
7171
2. registers a "command", passing a callback that will run when that command is dispatched. The command callback creates and inserts a TweetNode in the editor.
7272

73-
You can see how it's used in the playground [here](https://github.com/facebook/lexical/blob/0775ab929e65723433626fa8c25900941e7f232f/packages/lexical-playground/src/Editor.tsx#L137). It's added it as a child of a LexicalComposer component, which does the job of providing the Context necessary for access to the editor instance. To actually trigger this command callback and insert a [TweetNode](https://github.com/facebook/lexical/blob/b0fa38615c03f1c4fc7c8c5ea26412b723770e55/packages/lexical-playground/src/nodes/TweetNode.tsx#L212), we have a [button](https://github.com/facebook/lexical/blob/b0fa38615c03f1c4fc7c8c5ea26412b723770e55/packages/lexical-playground/src/plugins/ToolbarPlugin.tsx#L534) that "dispatches" the Tweet command we registered in the plugin.
73+
You can see how [TwitterPlugin is used in the playground](https://github.com/facebook/lexical/blob/0775ab929e65723433626fa8c25900941e7f232f/packages/lexical-playground/src/Editor.tsx#L137). It's added it as a child of a LexicalComposer component, which does the job of providing the Context necessary for access to the editor instance. To actually trigger this command callback and insert a [TweetNode](https://github.com/facebook/lexical/blob/b0fa38615c03f1c4fc7c8c5ea26412b723770e55/packages/lexical-playground/src/nodes/TweetNode.tsx#L212), we have a [button](https://github.com/facebook/lexical/blob/b0fa38615c03f1c4fc7c8c5ea26412b723770e55/packages/lexical-playground/src/plugins/ToolbarPlugin.tsx#L534) that "dispatches" the Tweet command we registered in the plugin.
7474

7575
While the TwitterPlugin registers a command that inserts a custom node, this is only one example of what can be done with a plugin. To get a better idea of what's possible, take a look at the [plugins defined in the playground](https://github.com/facebook/lexical/tree/0775ab929e65723433626fa8c25900941e7f232f/packages/lexical-playground/src/plugins).

0 commit comments

Comments
 (0)