Postponed
Project:
Olivero
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Oct 2020 at 14:36 UTC
Updated:
2 Oct 2026 at 10:15 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
gauravvvv commentedI have provided the patch please verify if it is working or not, Adding a after patch screenshot for reference.
Comment #3
gauravvvv commentedComment #4
vulcanr commentedPretty straight forward
Comment #5
mherchelComment #6
kishor_kolekar commentedplease review the patch.
Comment #7
kishor_kolekar commentedComment #8
abhijith s commentedApplied patch #6 .The text overflow on links will be gone after applying this patch.



Including screenshots
Before patch
After patch:
After patch Mobile device:
However the link section (Tags here) seems little odd after applying this patch.Is that ok ?
Comment #9
mherchelThere's a couple issues with this patch, and I'm not sure this approach will work.
1. The CSS does not pass linting:
2. This patch causes normal length words to be also be broken (see image below).
Comment #10
mherchelComment #11
hansa11 commentedComment #12
hansa11 commentedThis should resolve the issue.
Before patch:

After Patch:

Please review.
Thanks!
Comment #13
hansa11 commentedComment #14
mherchelThis looks great! Tested out in various browsers and it
1) Line-breaks long links
2) Line-breaks long links that contain spaces using the spaces
I'd like to be a little more descriptive of the comment here, though. Maybe something like "Cannot use break-all on webkit, as that will cause line-breaks inside of words" or something (assuming that's what is meant by the comment).
Comment #15
hansa11 commentedThank you @mherchel for the review, updated the comment to be more descriptive.
Please review.
Thanks!
Comment #16
asishsajeev commentedComment #17
asishsajeev commentedThanks for the patch.
Patch applied successfully.
I read the comments. It looks fine to me.
Comment #18
asishsajeev commentedComment #19
lauriiiIt might be a good idea to talk about this in one of the UX calls.
Comment #20
quietone commentedWhile I can't review front end issues I do look at them with the hope that I might learn something. I came here and the IS states that there are screenshots for reference but they are not in the IS. Where are they? It would help to have before and after screenshots in the IS.
Comment #21
lauriiiEmbedded the screenshot to the issue summary
Comment #22
lauriiiDiscussed this in the previous UX meeting: #3182480: Drupal Usability Meeting 2020-11-20. We thought that it is a good idea to prevent overflow of text. However, when text overflows, the text should have hyphenation. We should probably use the CSS hyphens property for that. It is not supported by all languages and all browsers but we think it's a nice enhancement in the languages and browsers that support it.
We should use
overflow-wrapinstead since that's the official property name: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap/.Why are we defining
word-breakhere? wouldn'toverflow-wrapbe sufficient?Comment #23
komalk commentedLooking into this.
Comment #43
komalk commentedWorked on #22
22.2 Using overflow-wrap not getting an expected output.
Using
word-break: break-word;getting an expected output.refer screenshot.
Comment #44
gauravvvv commentedIn Core theme Bartik we're using "word-wrap: break-word;" Why can't we use that here? Any specific reason?
Comment #45
hinal05 commentedI have re-rolled the patch #43.
Comment #46
imalabyaWell, the patch seems to resolve the issue however, if there are multiple long tags then the comma placement seems off.
Also, the text needs to wrap on tables

Comment #47
imalabyaAdded a patch to place the comma at the bottom of the term, however, it doesn't take into account if there are only a few characters on the last line the comma will be placed at the end of the line.
Tables are the patch.
Comment #49
gauravvvv commentedPatch #43, Still looks fine to me. Moving to RTBC.
Comment #50
gauravvvv commentedComment #51
mherchelRegarding @lauriii's comment in #22.
If we use
hyphens:auto, it will unnecessarily break words and insert hyphens. Screenshot below:Comment #52
mherchelI updated the patch and moved the
word-break: break-word;into the base<a>tag, so it will affect all long text links (including in sidebar, menu, etc).Comment #53
imalabyaLooks and works great. Marking RTBC!
Comment #55
imalabyaRandom test failure? Bcz the patch has passed for sure previously. 🤔
Comment #56
hinal05 commentedApplied patch #52 and it's working fine but there is some test error. I have uploaded re-roll patch. Please review it.
Comment #57
bhumikavarshney commentedHi
Applied patch #56 and it's working fine with no errors. Please review the SS.
Comment #58
tyler36 commentedBecause this is intended for Olivero, the "new default" theme, can we get some confirmation that:
- this looks good with non-English languages?
- this looks good with RTL (right-to-left) languages?
Lorem text & keyboard-smash text don't really represent real world examples (although they do help illustrate potential pain points).
Comment #59
meghasharma commentedPatch #56 applied cleanly and it is working well.
Reviewed the #57 screenshots.
Olivero's body text will overflow when link text too long issue Resolved
Marking as RTBC
Comment #60
kleiton_rodrigues commentedPatch #56 successfully applied.
Olivero's body text will overflow when link text too long.
RTBC +1
Comment #61
alexpottI think this should be
overflow-wrap: anywhere- work-break: break-word has been deprecated - https://drafts.csswg.org/css-text-3/#valdef-word-break-break-wordComment #62
gauravvvv commentedI have updated the property
word-break: break-word;tooverflow-wrap: anywhere;as suggested by alexpott in #61.Added an after patch screenshot for ref.
Comment #63
gauravvvv commentedComment #64
gauravvvv commentedAttached interdiff for #56 #62.
Comment #65
alexpottOnly the a tag one should have changed afaik. This should be
overflow-wrap: break-word;as it was in #56Comment #66
mherchelThis is a bit hard to follow, but from what I can tell, we should be using
overflow-wrap: anywhere. This leaves open for "Soft opportunities" to break the word to work. See https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrapIf we add the rule onto the base links we should also remove it from the
.text-content a, as it's no longer needed there.Comment #67
tyler36 commented`word-break: break-word;` should be used because of better browsers support (global users supported 94.31%).
`overflow-wrap: anywhere;` should be avoided because of less support (global users 73.07%), specificially it is not support by Safari or Safari iOS (browser support,).
Since Olivero is part of Drupal 9.1.0 and Drupal core is suppose to support "The latest release of each of the latest two supported major versions of Safari ... Safari for iOS", it can not be included.
Comment #68
mherchelGood catch @tyler36. Agree.
Comment #69
alexpott@tyler36 / @mherchel - looking at https://caniuse.com/?search=overflow-wrap%3A%20break-word - I think in the pcss we should be using overflow-wrap: break-work and then see what the preprocessor comes up with.
I agree that sadly anywhere does not look supported enough... it's odd that the preprocessor changes it to
word-wrap: anywhere- becauseanywhereis not well supported by our target browsers.Comment #70
alexpottAfter discussing with @lauriii I think we should be adding overflow-wrap: break-word; to the .pcss files and then I expect the CSS preprocessor to change this to the more widely supported word-wrap: break-word; in the .css files.
Also whatever we decide here needs replicating in #3197894: Claro's Body overflow when link text too long. and vice versa.
Comment #71
gauravvvv commentedI have attached a patch as per the solution suggested by Alexpott in #69.
overflow-wrap: break-word; converted into word-wrap: break-word; by compiling CSS.
I think this ready to be committed. thanks
Comment #72
gauravvvv commentedComment #73
sakthivel m commentedHi @Gauravmahlawat,
Patch applied successfully,
All issue fixed except node content, I have attached issue screenshot.
Comment #74
sakthivel m commentedComment #75
sakthivel m commentedComment #77
akhildev.cs commentedhi sakthivel,
I applied patch #75 ( 9.3.x-dev) but still experiencing the issue... please find the screenshot attached.
Comment #78
anybodyI agree break-word might not be enough if there is no breaking char contained in the long word. For example, this could happen for long tags or system paths in text or similar things. In my case in linked views titles and tags.
Also, I saw this for <blockquote> - that should also be tested please.
Have a look at some approaches here: https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-...
I'm currently using
successfully.
Finally I'm not a themer and I'm not sure what's best practice here. Perhaps have a look at a large framework like bootstrap too?
Comment #79
anybodyComment #80
pragati_kanade commentedHi, I tried to apply patch #74 & #75. But Patch failed.
Comment #81
vsujeetkumar commentedRe-roll patch given for 9.3.x.
Comment #82
manojithape commentedComment #83
pragati_kanade commentedHi vsujeetkumar ,
I tried to apply Patch #81.
Patch Failed.Please find attached ss.
Thanks.
Comment #84
pragati_kanade commentedComment #85
manojithape commentedComment #86
gauravvvv commentedHI @pragati_kanade, the patch is passing drupal CI. so don't post screenshots of the patch applying.
Comment #87
Madhu kumar commentedPatch #81 applied cleanly but after applying patch issue still exist. Added screen shot for reference.
Comment #88
chetanbharambe commentedVerified and tested patch #81.
Patch applied successfully but functionality not working
Testing Steps:
# Apply Olivero theme
# Add Tag field in any content type
# Goto: node/add/article
# Fill long text in the tag field
# Save it
Expected Results:
# User should not see the breaking and overflowing long text which is mentioned in tag field.
Actual Results:
# User is able to see breaking and overflowing long text which is mentioned in the tag field.
Not working as expected.
Moving to Needs Work.
Comment #89
vsujeetkumar commentedHi I have test the patch and found that the issue only comes with "Article" content type, For rest is working fine. According to my findings `word-wrap: break-word;` is not appropriate, I have used `word-break: break-word;` and its working fine with all the cases.
I am not front end guy however I have created the patch, Please have a look and advise.
Comment #90
radheymkumar commented#6 Patch applied successfully. sharing screenshot.
Comment #91
marcusvsouza commentedThe patch in comment #89 applies properly and fiz the problem!
Comment #92
Madhu kumar commentedPatch #89 applied cleanly and all the alignment are proper , working as expected.
Comment #93
gauravvvv commentedDon't forgot to change the status after reviewing.
Patch #89, looks good to me. Moving to RTBC +1.
Comment #94
mherchelComment #95
mherchelI created a CodePen to experiment with various properties and combinations at https://codepen.io/mherchel/pen/WNjVQjj
Comment #96
rainbreaw commentedWhile this is strictly speaking, a failure of reflow, when looking at the text in WCAG around resizing text and reflow, given the variety of challenges, at the moment this is not a stable blocker.
Reference: https://www.w3.org/WAI/WCAG21/Understanding/resize-text.html#examples
Given the potential challenges to users that each potential introduces, the current least-bad approach is to follow the default browser behavior and to not break or hyphenate words.
On the office hours, we determined that we should keep this issue open so that it can be resolved in the future when better solutions on the browser side might be available.
Comment #97
mherchelPer @rainbreaw's comment above, I'm postponing this issue.
Comment #98
andrewmacpherson commentedNormal status will do for this; we mentioned it in the a11y office hours discussion, I think. WCAG success criterion 1.4.10 Reflow is a level AA. Major is generally (but not exclusively) for level A.
We actually had patch #89 at RTBC in comment #93, so it deserves an explanation of why we're postponing this, instead of proceeding with the CSS change. Here are some more points from this week's a11y office hours:
<wbr>, say) but that doesn't help us here. For a general-purpose, off-the-peg theme, we need a automatic approach.The upshot is that we don't like the CSS approach, and we don't have any better ideas for the time being. It remains open because the WCAG Reflow failure is still an issue, particularly for magnifier users and mobility-impaired users.
Comment #99
mherchelThat change broke long words without adding a hyphen. During office hours, multiple maintainers (most notably @rainbreaw) noted how this hinders readability.
Comment #100
vikashsoni commentedApplied patch #6 working fine and applied successfully
Thanks for the patch
for ref sharing screenshots....
Comment #103
kristen polPlease add credits as appropriate to those who contributed on this duplicate issue, thanks!
#3205146: Olivero's Title overflow when title link text too long.
Comment #105
mgiffordTagging for WCAG 1.4.10
Comment #108
quietone commentedThe Olivero theme was approved for removal in #3590816: [policy, no patch] Deprecate Olivero and move to contrib.
The deprecation work is in #3595082: [meta] Tasks to deprecate the Olivero theme and the removal work in #3595085: [meta] Tasks to remove the Olivero theme.
Comment #109
quietone commentedComment #110
quietone commented