-
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
The Preview button should be a link #9446
Comments
Thanks for the ping! This is a subtly complex issue. In #7883 we wanted to indicate that the preview link opens in a new tab, but we that wasn't preferable because visually it's a button, and it's somewhat unexpected for the open in new tab icon to appear in a button. I'd be happy to change it to a link again, but I can imagine as soon as I do there'll be another issue asking "why does this link not indicate to the user that it opens in a new tab?", and we'd be back to square one. Preferably we'd solve both at the same time so that we don't end up flip-flopping back and forth. Maybe the solution would be to make it a link with the hidden accessibility text indicating it opens in a new tab, but not to display the icon associated with that? I'll also cc @noisysocks who was involved in that decision. |
This sounds fine to me. Sighted users will still not be surprised by a new tab opening since the link will visually look like a button. |
While looking into this I remembered that the reason we did this is because we must open the new tab programatically using @afercia: Does it make sense to make Preview an |
@noisysocks thanks for the ping. The Preview control navigates to a new page, e.g. For example, screen readers have dedicated shortcuts and tools to:
An I'd recommend to populate the It doesn't matter so much if the actual behavior is then handled via JavaScript, as long as it replicates a native link interaction and semantics. Screenshot of the link lists in NVDA: Screenshot of the link lists in VoiceOver: Example shortcuts to navigate through links:
|
👍 |
The Preview button used to be a link styled like a button. With the changes introduced in #7883 it is now rendered as a
<button>
element.This is far from ideal from a semantics and accessibility perspective. It was also noted in #7883 (comment) that links need to be communicated as such to software and assistive technologies.
Noting this has nothing to do with the visual look of this "button". Under the hood it needs to be an
<a>
element, then it can be styled as desired.The text was updated successfully, but these errors were encountered: