-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Zoom in breaks list item #1261
Comments
We should probably hide overflow to fix this. As the container shouldn't increase with font size according to the MD team. |
Thanks for the reply :) I'm a bit surprised though: usually we zoom in because we have a hard time reading. Hiding part of the text is the exact opposite... |
I made the argument to handle everything dynamically. Material Design team disagreed. Here we are. Hiding is the best acceptable solution that aligns to the team's wishes. |
Don't they care about accessibility? Why this position? :( |
It's not that they don't care. It's that changing the font size doesn't mean you want all the components of the page to resize as well. Font size affects font-related things. Not the size of blocks themselves. |
Playing the devil's advocate, you're good at that ;) Strange choice still, contrary to the aim of zooming IMHO. Is it a commonplace choice regarding accessibility to discard content in favor of shapes when zooming in? I never heard/read such thinking (being not an expert though...). Anyway, I'll try to change the behavior on my side and be done with it. A pity since it casts quite some shadows on the others decisions (are there some other surprising ones?)... Issue closed on my side, feel free to close when you feel like it. Thanks for your instructive answers and MDC web! |
Adding overflow:hidden is the best short term fix. @cluelessjoe, if you'd like to submit a PR to fix this, use the
To @Garbee point, I've opened up some discussions with our design team around when we are suppose to truncate text, and when we are suppose to dynamically change font size or container size. Obviously handling cases dynamically is trickier, so we need time to prototype different options and review them with our designers. But perhaps we can address some of the usability concerns with future version of MDC Web. |
Resolves material-components#1261 Done through mdc-typography-overflow-ellipsis mixin
@lynnjepsen PR done, thanks for the indication |
BTW, it came back to me that I spotted this issue first not by zooming but by having long text in the list items. The long text would then be blurred as when zooming. Maybe long text makes a better case for handling better this issue, because then it's not due to some "rare" user interaction, but can happen anytime provided the length of the text displayed exceeds the available room for it. In case of dynamic content it can happen pretty randomly/frequently. |
My original recommendation, way back before MCW code was even officially started, was to An example of this can be seen in my original v2 button demo. This has an input you can modify the markup's font size with to see the resizing live. |
BTW, the Web Content Accessibility Guidelines (WCAG) 2.0, which is the legal standard regarding accessibility in the USA states :
and in the 1.4.8 Visual Presentation section (level AAA)
Regarding em/rem, there is 'C14: Using em units for font sizes' technique note which is described like this:
and is checked this way:
So it actually looks like em are required for level WCAG 2.0 of level AA. So, while not being a lawyer, this looks mandatory in the USA and is mandatory for sure in France when willing to do accessible websites (which is now required by law and enforced at least for state related websites, like the ones for hospitals, cities and administration). Pretty serious stuff in the end IMHO. |
@cluelessjoe C14 doesn't say em's are required for everything. It does however say to make sure font sizes are responsive, which is what is provided. The zooming up to 200% losslessly is achievable with other methods than simply using rem/em on everything. We need guidance from the MD team here on how this needs to be proceeded with. This is definitely some valuable information to get provided to them though. It helps show the legal regulations around designing for this aspect of user experiences which is an important thing for quite a few industries. |
What MDC-Web Version are you using?
I'm using material-components-web version "0.19.0" and @material/list version 0.2.17
What browser(s) is this bug affecting?
Firefox 55.0.3 64 bits for Arch Linux
Your user agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Other HTTP headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
COOKIE: ah=fr-fr
UPGRADE-INSECURE-REQUESTS: 1
What OS are you using?
Arch Linux (uname -a : 4.12.8-2-ARCH #1 SMP PREEMPT Fri Aug 18 14:08:02 UTC 2017 x86_64 GNU/Linux)
What are the steps to reproduce the bug?
In my case I had a long text in the list item and it behaved the same.
What is the expected behavior?
The height of the list item should increase
What is the actual behavior?
The various lines are overlapping.
Any other information you believe would be useful?
I'm no css/design expert, may be that's a correct behavior, but I find it poor with accessibility reasons (zooming in makes the content unreadable)
The text was updated successfully, but these errors were encountered: