-
Notifications
You must be signed in to change notification settings - Fork 843
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
[EuiLink] Adding new tab/window help text for screen readers #3659
Comments
I feel this falls under the bucket "should be fixed by the browser platform", similar to recent discussions around tabbing to scrollable div containers. I suppose the simple fix of adding an EuiScreenReaderOnly in affected EuiLinks makes the surface area for this very small, but could become complicated if/when individual browsers fix this on their end; wouldn't want the message duplicated. |
I also feel this is something that is so simplistic on the browser side that I don't want to create something on our side to cover. It seems more like a bug with them, and while I know we tend to fix browser oversights for this in more complicated components, I feel the line where we do that starts is when we're making non-semantic UI like toasts. I don't think this is something we should take on, but will leave it up for discussion for a bit. |
I needed a short distraction and this seemed sufficiently small. I threw together a PR to show just how small the surface area for this is: #4172
Theoretically, I guess. But this is also an issue as old as dirt so there's no reason to assume this will come in any sort of immediate future and worst case we could revert this fix if it ever becomes to difficult to maintain what is currently a single conditional.
It could be annoying to have a message be duplicate but I'd rather get the same message twice than 0 times and be left without context.
Am I understanding your point correctly that we'd fix this if it was more complicated but because it's so easy to fix we shouldn't? It'd seem to me that we should squash the easy bugs first while egging on browsers to solve the harder problems. Even in this same file, we do a similar patch for what is effectively a browser/networking bug where we add |
Given that visual&audio warning when a link will open in a new window is a recommended technique (https://www.w3.org/TR/WCAG20-TECHS/G201.html), and that we do provide the visual indication through EuiLink's existing Which opens up a new question: EuiLink's |
I think we leave them entirely separate (as it is now) and leave it up to consumers to ask for the icon or setup the target if they want it. On the flip side, we could wrap up some more magic into this and auto add |
Talked with @cchaos and I'm good with her proposal of how
If we get that into your PR I think we'll be good |
Whenever a link is going to open in a new tab or window, we should warn screen readers ahead of time.
In an ideal world, they could do this for us but support is abysmal right now so we're going to have to help out.
The easiest way we can do this is adding some hidden text to the link text that reads "opens in a new window/tab" at the end of the link if the user passes in a
target
attribute.Related Kibana issue: elastic/kibana#43020
The text was updated successfully, but these errors were encountered: