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

Issue fork drupal-3291356

Command icon 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:

Comments

Anonymous’s picture

Janner created an issue. See original summary.

immaculatexavier’s picture

Status: Active » Needs review
StatusFileSize
new1.07 KB

Placed comment titles above authoring info in comment.html.twig .
Attached the patch

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Accessibility

Patch tested and works as expected. Thanks

quietone’s picture

Title: Suggestion: Olivero theme should place comment titles above authoring info in comment.html.twig in order to enhance screenreader experience » Olivero theme should place comment titles above authoring info in comment.html.twig in order to enhance screenreader experience

Tweaking the title.

lauriii’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
StatusFileSize
new39.87 KB
new49.44 KB

While 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:

AkshayAdhav made their first commit to this issue’s fork.

akshayadhav’s picture

Assigned: Unassigned » akshayadhav

akshayadhav’s picture

Assigned: akshayadhav » Unassigned
Status: Needs work » Needs review
StatusFileSize
new276.24 KB

Made the changes as per comment #5

abhijith s’s picture

StatusFileSize
new9.32 KB
new9.62 KB

Applied 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:
before

After patch:
after

Needs work.

akshayadhav’s picture

@Abhijith S
Please clear the cache and then check. CSS is cached.

Aamir M’s picture

Assigned: Unassigned » Aamir M
Aamir M’s picture

Assigned: Aamir M » Unassigned
Status: Needs review » Needs work
StatusFileSize
new19.11 KB
new19.94 KB

Applied 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

Anchal_gupta made their first commit to this issue’s fork.

anchal_gupta’s picture

Status: Needs work » Needs review

Committed with MR to fix the comment title Aligned issue. Please review it

Aamir M’s picture

Assigned: Unassigned » Aamir M
Aamir M’s picture

Assigned: Aamir M » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new51.71 KB
new52.88 KB

Applied 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

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

Custom commands are still failing.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new2.33 KB

Patch #14, no longer applies to d10. Re-rolled it for d10. Please review.

Status: Needs review » Needs work

The last submitted patch, 20: 3291356-20.patch, failed testing. View results

mgifford’s picture

Issue tags: +wcag131

Tagging for SC 1.3.1.

gauravvvv’s picture

Status: Needs work » Needs review

Restoring status, unrelated failure.

varun verma’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new377.63 KB
new350.02 KB

I have applied #20 patch, It’s working properly screenshots attached.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 20: 3291356-20.patch, failed testing. View results

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

akshayadhav’s picture

Status: Needs work » Needs review
StatusFileSize
new2.54 KB
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests, +Needs change record, +Needs subsystem maintainer review

Believe this will need test coverage.

drein’s picture

To 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.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.