-
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
Fix Inconsistent Labels for Lightbox Feature #68261
Fix Inconsistent Labels for Lightbox Feature #68261
Conversation
This reverts commit 63f81c1.
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. |
@afercia - Please have a look at this PR and let me know if you have any suggestions. |
@@ -234,6 +229,7 @@ class="lightbox-trigger" | |||
type="button" | |||
aria-haspopup="dialog" | |||
aria-label="' . esc_attr( $aria_label ) . '" | |||
aria-describedby="' . esc_attr( $alt ) . '" |
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.
The aria-describedby
attribute should point to the ID of a hidden element that contains the description. If it turns to be too complicated, we could consider to not use a description at all.
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.
@afercia - Considering the complexity of this implementation, I have removed the aria-describedby attribute as per your suggestion. We can address it in a separate PR to ensure it is handled comprehensively.
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 left a comment about aria-describedby that should be addressed.
Also, some tests are failing because they still expect a button with name 'Expand on click'', they should be updated/
A quick note; I think the preferred way to sync with trunk is to rebase insteaf of merging trunk.
@karthick-murugan thanks for working on this. I think that the button label should stay |
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.
Looks good to me but a new variable should be adder to be used for the modal dialog label.
@afercia - Thanks for your time on reviewing this PR. Updated the changes that you have requested. |
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.
Looks good to me.
This improves naming consistency, simplifies labeling and makes the UI more predictable.
What?
Fixes #55617
This PR ensures consistent terminology between the editor (backend) and frontend for the lightbox feature. The label "Expand on click" in the editor has been updated to "Enlarge image" for alignment with the frontend aria-labels.
Why?
Consistency in terminology is vital for accessibility and usability. Users of assistive technology will now encounter the same terms ("Enlarge image") in both the editor and frontend, reducing potential confusion.
How?
Testing Instructions
Screenshots or screencast
After making changes