-
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 the Save buttons labelling and tooltip #43952
Conversation
Size Change: +49 B (0%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
a457a2f
to
a00343c
Compare
Note: turns out that setting the
triggers a full re-rendering of the button. This makes the Maybe the test can be fixed but it would be great to avoid a full re-rendering in the first place. Some help would be very welcome. What triggers the re-rendering is a bit obscure to me. Update: |
To recap findings about the tooltip issue:
For now, I mitigated the problem by setting the prop I'll move the full re-rendering issue in a GitHub discussion. |
See open discussion at #44735 |
0028b78
to
dbc9d3a
Compare
Fixes #42819
What?
Post editor: based on the post saved state, the Save button aria-label may mismatch the button visible text and provide an incorrect information to assistive technology users. For example. when the post is saved, the visible text is 'Saved' but the aria-label is still 'Save draft'. Also, when the 'Show button text labels' preferences is enabled, the tooltip shows only the keyboard shortcut, which looks broken visually.
Site editor: the Save button does have an associated keyboard shortcut. However, the shortcut isn't exposed visually. For consistency, it should.
Why?
Mismatching visible text and aria-label are a serious accessibility problem, as they provide users with inconsistent information. Also, the tooltip should work consistently for all buttons and when there's a associated keyboard shortcut, they should display both the label and the shortcut.
How?
Post Editor save button:
label
prop so that the button tooltip works also when 'Show button text labels' is enabled.Site editor save button:
label
prop so that the save button tooltip works.shortcut
prop to display the available keyboard shortcut within the tooltip.Testing Instructions
Post editor
Site editor
Screenshots or screencast
Post editor with 'Show button text labels' enabled, before:
Post editor with 'Show button text labels' enabled, after: