-
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: Publish date not announced in voice over; Redundant duplicate labels; #15381
Fix: Publish date not announced in voice over; Redundant duplicate labels; #15381
Conversation
@jorgefilipecosta thanks for looking into this! Reminder:
Chrome + VoiceOver before: Safari + VoiceOver before: Technically, multiple labels are valid and as you can see Safari+VoiceOver announce both labels. The fact it doesn't work with Chrome is very likely a Chrome bug. Safari + VoiceOver after the patch: and, after a brief pause, the
The real, fundamental problem with these "Publish" and "Visibility" buttons is that their text represents the current value. Instead, it should be the available action: the "what" the buttons are about. This was initially reported on #470, created on April 2017. Two years ago. Still pending a solution. I don't want to repeat all the considerations made on #470 but, to summarize: controls should never be labelled with the current value or state. Labels are meant to give controls their accessible name, that's meant to give users the necessary information on what a control does. Imagine a "first name" input field: would anyone ever label the input field with their first name? (see screenshot below): I guess nobody would 🙂 However, that's basically what these two buttons do: they're labelled with the current value, which is totally incorrect from a web standards / semantics / accessibility perspective. For now, I'd suggest to change this PR and make the Publish button the same as the Visibility button: they should work the same and also get the same improvements. Please remove the aria-label, aria-describedby, the id on the span. I'd then recommend to give #470 a higher priority and come to a better solution. |
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.
Please see previous comment.
5808ab3
to
0d1b38d
Compare
Thank you for all the context provided @afercia.
I followed the suggestion and applied these changes, this control is now equal to the visibility control and the same improvements could be applied to but controls. |
0d1b38d
to
86e2dde
Compare
This PR was rebased, I guess it is ready to merge. |
@jorgefilipecosta thanks! Looks good to me, as it's a simplification and at least the two buttons are now the same. I've removed Please do feel free to merge at your leisure (if no objections)! |
4eeaa7e
to
f4e380f
Compare
Fix: #11747
This PR fixes #11747 by removing a duplicate label.
It also addresses another problem. Given that we have a Publish label labeling the button, the publish date is never announced for users of assistive technologies. Only the word publish is announced, this PR addresses that problem.
I'm using an aria-label for the button because, besides the date normally shown in the button, I also want assistive technologies to announce 'Click to change'. I'm not sure if announcing 'Click to change' is required but it seemed helpful.
How has this been tested?
I used voice over and verified the select date is now announced when the button gets focus.
Screenshots