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

Nav block list view - Page List (parent) doesn't provide context that it is locked whereas children do. #48018

Open
getdave opened this issue Feb 13, 2023 · 4 comments
Labels
[Block] Navigation Affects the Navigation Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended

Comments

@getdave
Copy link
Contributor

getdave commented Feb 13, 2023

The Page List (parent) doesn't provide context that it is locked whereas children do. This is confusing for assistive tech.

Originally posted by @getdave in #46939 (comment)

@getdave getdave added [Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Feb 13, 2023
@alexstine
Copy link
Contributor

@getdave or @draganescu Any advice on where to look for adjusting this? I am not sure why page list itself would not identify itself as locked. I think this is a block attribute but wouldn't a locked state get outputted at a fairly global level?

Thanks.

@getdave
Copy link
Contributor Author

getdave commented Feb 27, 2023

@alexstine The lock status of the block for the Navigation block list view (only) is accessed here

const { isLocked, isContentLocked } = useBlockLock( clientId );

This uses the useBlockLock hook from the @wordpress/block-editor package.

I hope that helps?

@alexstine
Copy link
Contributor

I am trying to figure out if the issue is with useBlockLock or the block itself. I think it might be the page-list block itself. It seems to not have any templateLock attribute. I do not know how to update blocks at the moment. According to the hook, it does get the rootClientId so I would think it should be able to detect if the parent block is locked.

Figured I would try to take a quick look at this to see if I could make the release but I think this is currently a bit too much out of scope of my current knowledge. I have never studied the block API.

Thanks.

@draganescu
Copy link
Contributor

#48723 may remove this issue, or part of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants