Repository navigation
Conversation
|
Size Change: +82 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
getdave
left a comment
There was a problem hiding this comment.
I don't have the expertise to know quite how best to address this and whether it's appropriate.
It's seems sensible apart from the duplicate aria-label
|
Flaky tests detected in ff21a8f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4073329420
|
| const label = navigationMenu | ||
| ? sprintf( | ||
| /* translators: %s: The name of a menu. */ | ||
| __( 'Navigation menu: %s' ), | ||
| navigationMenu.title | ||
| ) | ||
| : __( 'You have not yet created any menus. Displaying a list of your Pages' ); |
There was a problem hiding this comment.
The piece that's missing is that this doesn't tell the user what kind of UI they're going to encounter. It might be worth keeping something closer to 'Block navigation structure' or 'List view' as the label in that respect. Possibly 'Navigation block list view'.
My feeling is that the context about the current state of the menu could be added as an aria description, as this is secondary information.
Would be good to get @alexstine's opinion on this.
There was a problem hiding this comment.
Yes. I do wonder whether mirroring what you did in #47047 would be a good option. Use an description to announce what the thing does.
This definitely requires accessibility feedback from an expert in this field.
See #44291 (review) for some context. TLDR, it may be best to keep the duplication. It could be worth adding a comment to the code to explain it. |
|
I think |
alexstine
left a comment
There was a problem hiding this comment.
@scruffian See one note below.
9887783 to
83c184e
Compare
|
Ok I've updated this to use If you're happy with this then I'll also apply it to the List View component. Sidenote - |
|
That sounds good to me. Thanks. |
| ? sprintf( | ||
| /* translators: %s: The name of a menu. */ | ||
| __( 'Structure for navigation menu: %s' ), | ||
| navigationMenu.title |
There was a problem hiding this comment.
We should handle a situation where this title could be undefined. Just in case. I think I saw @talldan catch a similar bug on the Page List recently.
Update packages/block-library/src/navigation/edit/menu-inspector-controls.js Co-authored-by: Dave Smith <getdavemail@gmail.com> Update packages/block-library/src/navigation/edit/menu-inspector-controls.js Co-authored-by: Alex Stine <alex.stine@yourtechadvisors.com> switch to using a description rather than another label Update packages/block-library/src/navigation/edit/menu-inspector-controls.js Co-authored-by: Dave Smith <getdavemail@gmail.com>
|
I just cherry-picked this PR to the release/15.1 branch to get it included in the next release: 767b8dd |
…rid inside the component. (#47031) * Improve accessible Name of the Navigation Offcanvas List View Update packages/block-library/src/navigation/edit/menu-inspector-controls.js Co-authored-by: Dave Smith <getdavemail@gmail.com> Update packages/block-library/src/navigation/edit/menu-inspector-controls.js Co-authored-by: Alex Stine <alex.stine@yourtechadvisors.com> switch to using a description rather than another label Update packages/block-library/src/navigation/edit/menu-inspector-controls.js Co-authored-by: Dave Smith <getdavemail@gmail.com> * Apply suggestions from code review * disable linting * fix linter --------- Co-authored-by: Ben Dwyer <ben@escruffian.com> Co-authored-by: Dave Smith <getdavemail@gmail.com>


What?
This makes it possible to modify the name of the OffCanvasEditor component, so that it can be customized to the context it's being used in.
Why?
The previous label doesn't make sense in the Navigation List View context.
How?
Adds a prop to the OffCanvasEditor component. The List View component should also get this prop if this is the right way to achieve this.
Testing Instructions for Keyboard
Fixes #47022