-
Notifications
You must be signed in to change notification settings - Fork 486
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
IE11 - <a> element is hard to click with child lexicon-icon #1242
Comments
Hey @SpencerWoo, I'm actually ok with removing it, we just need to add the attribute This is a nitpick, but I'm not a fan of linking icons that way. The There is also a Clay CSS component that will do that for you, but you need to change the width, height and font-size if you want it to be something other than 32px. The font-size property will size the icon for you if you're using a Lexicon icon. See https://clayui.com/docs/css-framework/satellites/links.html
|
@pat270 thank you for the quick response!
|
Hi @pat270 looking at the code I think https://issues.liferay.com/browse/LPS-71422 added Assuming that's what we needed, are we good to remove pointer-events:none from lexicon icons? Or perhaps even just from
Let me know -- thanks! |
…n-icon` use attribute `focusable="false" instead for IE11
I removed it from |
Awesome, thanks. Also once it's in Master I'll also want to also put it on 1.x for 7.0.x. |
This isn't an issue in 1.x, there is no |
If I'm not mistaken isn't 70x using 1.0.28 https://github.com/liferay/liferay-portal-ee/blob/7.0.x/modules/apps/foundation/frontend-js/frontend-js-web/build.gradle#L19 which has https://github.com/liferay/clay/blob/v1.0.28/src/scss/lexicon-base/_icons.scss#L5? If I'm mistaken and it isn't in 70x then nvm |
ugh, you're right. I don't know what to do about #926. Reverting that change will introduce that again. You happen to have a link to the ticket @gregory-bretall was fixing or some example of the bug? |
https://issues.liferay.com/browse/LPS-81456 tested and removing EDIT : @gregory-bretall any ideas on how we can resolve https://issues.liferay.com/browse/LPS-81456 and https://issues.liferay.com/browse/LPS-86160? |
So the only workaround I'm able to find for removing
or
I'm not sure if this will make it pass whatever test we are using. I'm including my references below: https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements |
hey @pat270 thanks for this. I missed your comment but I've come to a similar conclusion and just saw it now -- I think LPS-81456 is incorrect using |
'pointer-events:none' from '.lexicon-icon' use attribute 'focusable="false" instead for IE
@carloslancha, @marcoscv, could you please weigh in here? I remember we needed the |
the title in an SVG is needed but only for accessibility validation reasons, we don't need icons focus because they will be associated with a group text, button or title attribute (when it is a link/button). I'm not sure if this helps to take a solution. |
@marcoscv-work so we can't remove the title attribute from SVG? |
@pat270 We followed this to make the decision to add a title: But currently I'm not able to get an error with Axe plugin when I remove the title attribute in an SVG, so if you really need to remove 'title' we can make a deeper look |
To fix both issues mentioned by @SpencerWoo, we need to remove the title element from the svg. This is another solution that seems most reasonable:
from https://simplyaccessible.com/article/7-solutions-svgs/. |
Okay so it sounds like we're good to remove And then we're trying to properly fix #926 (LPS-81456) without regressing LPS-68726 by replacing svg Can we resolve this issue of |
It is Ok for me |
@SpencerWoo we should wait for the accessibility changes first. |
Okay, then is #1242 (comment) I'm not seeing where |
My $0.02. I don't feel the bulk, indiscriminate, adding of any type of title/labelledby/etc at the SVG level is helping accessibility. Sure we may pass some test and meet the letter-of-the-law, but we aren't meeting the spirit-of-the-law. Those tests are aids, not targets. For example, if I've got some user control for, uploading a user avatar. I may want these elements in the button.
But I don't want my screen reading saying:
More likely, I'd want something like:
You can't accomplish this by labeling every SVG. This has to be done on a case-by-case basis, by adding a label to the button element, describing it in context. Whoever implements the button is responsible to maintain accessibility in that context, not the SVG. The SVG is just an abstract visual aid. You cannot make it accessible abstractly. |
…er` to wrap svg icons so we can have the icon name spoken for screen readers at the bare minimum
…stead of title Fixes liferay#1242 - ClayIcon added properties ariaLabel and decorative
Ok so I decided to wrap the svg icons in a The way to make links/buttons/whatever accessible is to add an |
…er` to wrap svg icons so we can have the icon name spoken for screen readers at the bare minimum
…stead of title Fixes liferay#1242 - ClayIcon added properties ariaLabel and decorative
…r` to wrap svg icons so we can have the icon name spoken for screen readers at bare minimum
I am not sure what were best place for this comment: |
Any update on this one? |
LEXICONCSS #1242 - SVG Icons added `.lexicon-icon-container` to wrap svg icons so we can have the icon name spoken for screen readers
…d focusable attribute. Use role=presentation instead and rely on usage to provide proper semantics when using/wrapping the icon
…he title and focusable API
…he title and focusable API
Fixes #1242 - Adds an alert informing the discontinuation of the title and focusable API
We originally added pointer-events:none to lexicon icons here 0bec132. This makes sense as lexicon-icons shouldn't have to trigger events however in IE11 the lexicon-icon "covers" the parent element preventing it from being clickable.
https://jsfiddle.net/L430qpmc/7/
EDIT :
The first image link on IE11 can only be clicked by a small sliver of the image. The expected behavior is being able to click the image link
a
more or less wherever the red background is. The blue background "blocks" the red from being clicked -- contrast the first image with the second image.The text was updated successfully, but these errors were encountered: