Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks landing page: Code contains highlight #310

Closed
alexstine opened this issue Aug 11, 2023 · 2 comments
Closed

Blocks landing page: Code contains highlight #310

alexstine opened this issue Aug 11, 2023 · 2 comments
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc [Component] Content Bugs or issues related to the page content

Comments

@alexstine
Copy link

From: #245

It can be extremely verbose for screen reader users to hear highlighting marks in code samples/snippets. Possible fixes:

  1. Remove the marks.
  2. Add some type of raw view.
  3. Add a copy button.

Page: https://wordpress.org/blocks/
Heading 2: Complete creative control

@ndiego
Copy link
Member

ndiego commented Aug 11, 2023

Remove the marks.

We have a planned update to the example code cc @annezazu. This will be updated next week and will resolve this. The code will be updated to this:

registerBlockType( 'your-first-block/hello-world', {
    edit: function () {
        return <p>Hello world (from the editor)</p>;
    },
    save: function () {
        return <p>Hello world (from the frontend)</p>;
    },
} );

Add a copy button.

This page was built in the Editor so this is just the Code block, but more improvements could be tackled in future iterations.

@ryelle ryelle added Accessibility Issues related to keyboard navigation, screen readers, etc [Component] Content Bugs or issues related to the page content labels Aug 12, 2023
@ndiego
Copy link
Member

ndiego commented Sep 5, 2023

@ryelle this issue can be closed now that the updated code example has been added to the page.

@ryelle ryelle closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc [Component] Content Bugs or issues related to the page content
Projects
None yet
Development

No branches or pull requests

3 participants