-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Mobile]Update string concatenation for accessibility labels #15181
[Mobile]Update string concatenation for accessibility labels #15181
Conversation
bb9a492
to
cadb99b
Compare
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.
Working good!
I found a small detail on Image Block, described on code comments. The rest looks shinny ✨
Another small detail not related to labels:
The Image block is marked as a 'button' to show that it is actionable. Other blocks are not marked as a button but it says 'actions available'.
In general, I personally prefer mark everything that is actionable with double tap, that doesn't have a more specific trait (like link
), as button. If what the button action does is not obvious, there we can use hints.
__( 'Image caption. Empty.' ) : | ||
sprintf( | ||
/* translators: accessibility text. %s: image caption. */ | ||
__( 'Image caption. Empty. %s' ), |
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.
Here I believe it shouldn't say Empty
.
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.
copy paste error :(
accessibilityLabel={ | ||
isEmpty( caption ) ? | ||
/* translators: accessibility text. Empty image caption. */ | ||
__( 'Image caption. Empty.' ) : |
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.
There's a dot at the end that seems to not be needed/expected.
Ready for another look @etoledom |
I did some experiments about |
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.
Thank you for tiding this up, and for the investigation!
So it looks like we can still benefit from having the button role to indicate available actions.
I agree on keeping this as it is for now 👍
* Make accessibility labels properly localizable * Fix indentation * Fix image block accessibility labels
Description
Improves some accessibility labels and adds comments to make the localization process easier, based on the feed back at #15161
How has this been tested?
Tested via gutenberg mobile PR.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: