[Mobile]Update string concatenation for accessibility labels#15181
[Mobile]Update string concatenation for accessibility labels#15181
Conversation
bb9a492 to
cadb99b
Compare
etoledom
left a comment
There was a problem hiding this comment.
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.
Here I believe it shouldn't say Empty.
There was a problem hiding this comment.
copy paste error :(
| accessibilityLabel={ | ||
| isEmpty( caption ) ? | ||
| /* translators: accessibility text. Empty image caption. */ | ||
| __( 'Image caption. Empty.' ) : |
There was a problem hiding this comment.
There's a dot at the end that seems to not be needed/expected.
|
Ready for another look @etoledom |
I did some experiments about |
etoledom
left a comment
There was a problem hiding this comment.
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: