Problem/Motivation
The Olivero theme places the comment author and comment post date above the comment title in comment.html.twig.
As a screenreader user, this breaks my preferred method for quickly navigating/scanning through a list of comments.
My use case is to use the screenreader's ability to navigate by heading. With the current theming this has focus land on the title of comments. It seems (at least to me) counter-intuitive and a less than optimal user experience to then have to move backwards in the page to locate the comment author and post date.
This behaviour also introduces some level of inconsistency, as site content has the more typical placement of authoring information below the content title.
As a screenreader user, consistent across the site and a natural flow of focus is highly desirable. In my opinion, the current thumbing of comments is a hit on my user experience and ability to navigate comments in the most productive way.
This is a great shame, as Olivero is proving to be a great user experience in so many other ways.
I'm not a web accessibility professional, so quite possibly the current theming of comments has a logic and good practice that I am not aware of. However, it would be desirable in my opinion if the comment title were to be relocated to be the first element of a comment. This is likely a style of semantic markup that others will be familiar with and likely expect.
Proposed resolution
Make changes to comment.html.twig so that comment title is the first element of a comment.
Remaining tasks
Make suggested changes to comment.html.twig.
User interface changes
When viewing comments added to content the comment title will be located above the authoring information - new icon, author, post date, and visually hidden elements for screenreader users.
API changes
None
Data model changes
None
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | 3291356-27.patch | 2.54 KB | akshayadhav |
| #24 | Screenshot-after-3291356-20-patch.png | 350.02 KB | varun verma |
| #24 | Screenshot-before-3291356-20-patch.png | 377.63 KB | varun verma |
| #20 | 3291356-20.patch | 2.33 KB | gauravvvv |
| #17 | After patch CL.png | 52.88 KB | Aamir M |
Issue fork drupal-3291356
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3291356-olivero-theme-should
changes, plain diff MR !2524
Comments
Comment #1
Anonymous (not verified) commentedJanner created an issue. See original summary.
Comment #2
immaculatexavier commentedPlaced comment titles above authoring info in comment.html.twig .
Attached the patch
Comment #3
Anonymous (not verified) commentedPatch tested and works as expected. Thanks
Comment #4
quietone commentedTweaking the title.
Comment #5
lauriiiWhile this makes sense from markup perspective, we should still look at the impact of this to the attached styling. I can see that the vertical spacing doesn't work as it should after this change:
Before:

After:

Comment #7
akshayadhavComment #9
akshayadhavMade the changes as per comment #5
Comment #10
abhijith s commentedApplied MR !2524 on 9.5.x.The order of comment title is changed after applying this patch.But the comment title is not aligned with user image.
Before patch:

After patch:

Needs work.
Comment #11
akshayadhav@Abhijith S
Please clear the cache and then check. CSS is cached.
Comment #12
Aamir M commentedComment #13
Aamir M commentedApplied MR !2524 successfully on 9.5.x.
The comment title is displayed above authoring info in the comment after applying the patch. But the comment title is not aligned with the user profile image
Screenshots are attached for reference
Comment #15
anchal_gupta commentedCommitted with MR to fix the comment title Aligned issue. Please review it
Comment #16
Aamir M commentedComment #17
Aamir M commentedApplied MR !2524 successfully on 9.5.x.
The comment title is displayed above authoring info in the comment after applying the patch.
Now the comment title is also aligned with the user profile image
Screenshots are attached for reference
Looks good to me. Hence moved to RTBC
Comment #18
lauriiiCustom commands are still failing.
Comment #20
gauravvvv commentedPatch #14, no longer applies to d10. Re-rolled it for d10. Please review.
Comment #22
mgiffordTagging for SC 1.3.1.
Comment #23
gauravvvv commentedRestoring status, unrelated failure.
Comment #24
varun verma commentedI have applied #20 patch, It’s working properly screenshots attached.
Comment #27
akshayadhavComment #28
smustgrave commentedBelieve this will need test coverage.
Comment #29
drein commentedTo be honest, I also meet this problem on the homepage of the site, with the nodes. My Screen Reader reads me first the author and then the title of the node. I would like it to work like the other themes, first the title and then the author, but not being a programmer I don't know where to get my hands. Clearly, I will solve the problem with a view that acts as a homepage, but it's not the solution.