-
Notifications
You must be signed in to change notification settings - Fork 916
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
pkp/pkp-lib#5196 CSS Pseudo selectors creating a duplicated link announcement on screenreaders #3528
Conversation
@NateWr, could you review this one? Thanks! |
Thanks @israelcefrin. Can you help me understand why the change you proposes fixes the problem? It doesn't look like it touches any pseudo selector. Also, why was the added |
Hi @NateWr I've ran a screen reader test to navigate to this page to review the issue reported on the audit. It turns out that the extra spaces this code outputs generates a Also, when I removed the extra space I noticed that the buttons to galley got closer to each other.
It seems this white space was also generating a visual gap between the elements and I've fixed it by adding a margin to separate the clicking area of each button. Otherwise, people with low dexterity (or thick fingers) might run into trouble when they attempt to click on one of these buttons. |
I think we should try to solve this by removing the |
Hmm, I think we need to investigate this more. If that's indeed what happens, it wouldn't just happen here but everywhere that we use Removing white space between I think we need an alternative solution of some kind. I did a quick Google search but nothing came up. If the issue was so common, I'd expect to see it talked about more. That leads to me to think there may be other factors at play here. |
Quick thought: I wonder if it's because the |
I will run tests using |
…uncement on screenreaders
5e5c84b
to
bfe6a4f
Compare
@NateWr I've tested the page against VoiceOver with a CSS where I removed the |
This looks good, thanks @israelcefrin. Instead of I noticed this only fixes the problem on the article details page. But the same pattern is used on the article summary (issue lists and search results). Also, once that is done, I think you'll need to apply this to OPS's default theme as well. |
…uncement on screenreaders - article details,and summary
@NateWr I've adjusted the CSS selector to |
This is probably cleaning up the margin after the last element. I do this sometimes because in certain cases the margin will cause the last element to go to a new line, even though it would fit without the margin. I think you can fix this with: &:last-child { margin-inline-end: 0; } |
|
||
li { | ||
display: inline-block; | ||
margin-right: 1em; | ||
margin-inline-end: 1.25rem; |
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.
This should be 0.25rem
, not 1.25rem
.
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.
Same below.
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.
I've adjusted the margin due to the fact when I had changed to flexbox the parent container, the LI
elements decreased the space between the buttons.
See the current distance (non flexbox):
If I keepet 0.25rem
(with flexbox)
And using 1.25rem
(with flexbox)
I thought that this distance should be preserved for keeping enough room between elements and presenting easier user interaction (clicking) area. Should I change back to the original value?
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.
Oh my mistake. I thought that the previous margin was 0.25rem
but it was 1em
. I'd suggest leaving it the way that it was, 1em
. Sorry that was my mistake.
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.
No worries!
I've made all adjustments. Could you please review it and let me know if any other is required to merge?
…uncement on screenreaders - article details,and summary margins
|
||
li { | ||
display: inline-block; | ||
margin-inline-end: 0.25rem; |
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.
This needs to be set back to 1rem too. Sorry!
Just the one comment. Plus we need a PR for OPS. |
…uncement on screenreaders - fixing margin-inline-end
I've added the OPS PR in the original github issue: pkp/pkp-lib#5196 (comment) |
Fix the duplicated announcement of link galleys by screenreaders removing the extra space between closing / opening list item tags, i.e.:
</li><li>
. The required visual gap is fixed via CSS/LESS.