-
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] Improving accessibility on Post title #15106
Conversation
<View | ||
style={ [ styles.titleContainer, borderStyle, { borderColor } ] } | ||
accessible={ ! this.state.isSelected } | ||
accessibilityLabel={ __( 'Post title' ) + '. ' + ( isEmpty( title ) ? __( 'Empty' ) : title ) } |
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.
Just a quick note about this:
Although most languages use a period (.
) to end a sentence, some don't, and we might think that it would be more correct to use sprintf
in this case to concatenate the 2 sentences.
sprintf( __( 'Post title. %s' ), isEmpty( title ) ? __( 'Empty' ) : title )
However I don't think it's worth it at this point. it's not very clear for translators what the Post title. %s
string means (even with a comment). Moreover Post title
will probably be reused at other places so it makes more sense to translate that only.
Lastly, this sentence is built to be heard not read by the user.
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.
Updating this according to what we discussed
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.
Good catch! We can refer to this one for the future accessibility labels
Tested on iOS, this worked well 👍. I noticed it says "actions available" at the end, not sure why? |
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.
Tested via wordpress-mobile/gutenberg-mobile#916 (review) ✅
@Tug , for the Android issues we created a new ticket. There seems to be an issue with the Android side of the Aztec Wrapper: wordpress-mobile/gutenberg-mobile#918
Actions Available
: It's good to let the user know that something will happen if they double tap on it (this element has an action).
It's also good practice to mark these elements as button
(as they are tappable).
Let's after @Tug 's ✅ :)
hey @Tug are you ok with the last changes? |
Yes! let's 🚢 !! |
…rnmobile/887-History-stack-is-not-empty-on-a-fresh-start-of-the-editor * 'master' of https://github.com/WordPress/gutenberg: 'string' misspelled as 'srting' (#15118) [Mobile] Improving accessibility on Post title (#15106) Fix 13776: Format is already registered to handle class name (#15072) Add wpDataSelect WordPress end 2 end test util (#15052) Block Editor: move selection state from RichText to the store (#14640) chore: Fix: Lint error that makes unit tests (and CI tests) fail. (#15073) Set ownProps.onFocus when context.onFocus is undefined. (#15069)
* Add accessibilityLabel to post title * Update accessibilityLabel * Update accessibilityLabel * Remove unnecessary line * Import sprintf from i18n
Description
This PR improves accessibility on the Post title.
Fixes wordpress-mobile/gutenberg-mobile#912
To test:
Please refer to the gutenberg-mobile side PR.
Checklist: