-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Improve the various Alignment controls props handling #63696
base: trunk
Are you sure you want to change the base?
Improve the various Alignment controls props handling #63696
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Writing/updating test cases. |
@@ -456,6 +456,9 @@ function TableEdit( { | |||
<BlockControls group="block"> | |||
<AlignmentControl | |||
label={ __( 'Change column alignment' ) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change this label to use a more consistent wording with the other labels. Something along the lines of 'Align columns content' would be clear enough to amke the description not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR!
From an accessibility perspective I like the idea of making all these controls consistent to:
- Have a clear label that uses the same pattern.
- Have the ability to provide an optional description.
To me, all the labels should start with the verb Align
so that I would suggest to change the label of the table block.
I;d think that all the labels are clear enough, there's no need to provide a description which would be a littl eredundantl For example:
label: "Align block"
description: "Change block alignment"
The label is already clear enough. I'm not sure it needs a description.
The one for the table columns could be:
label: "Change column alignment"
and not need the description "Adjust the alignment of content within table columns".
I'd appreciate a review from @wordpress/gutenberg-core
WP 6.7 Beta 2 is tomorrow - it seems there has been little movement on this and I'm thinking we should punt it to 6.8. Thoughts? |
That makes sense to me 👍. |
screen-capture.webm |
Please check I have removed unnecessary description and just added clear labels for controls Thank you |
Fixes #63649
What?
This PR standardizes and improves the labels and descriptions for alignment controls across various blocks (Paragraph, Table, Group, and Media & Text) to enhance clarity and accessibility.
Why?
The current implementation has inconsistent and sometimes misleading labels and descriptions for alignment controls. This leads to confusion for users, especially those using screen readers. Standardizing these elements will improve the overall user experience and accessibility of the Gutenberg editor.
How?
aria-describedby
attributes.Screenshots or screencast
Paragraph
Table
Group
Media & Text